X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=src%2Fphp_http_filter.c;fp=src%2Fphp_http_filter.c;h=9b391048a22408cc95aa50df088b7f4813f59953;hp=b6d967b6f756eb27f62e57920086fabfa5655315;hb=749dbbaa0e7c5e33d27121dab0f53bda85a67339;hpb=061a30e33e42ae9332a56c26cbe15bccc9d0f61f diff --git a/src/php_http_filter.c b/src/php_http_filter.c index b6d967b..9b39104 100644 --- a/src/php_http_filter.c +++ b/src/php_http_filter.c @@ -302,7 +302,9 @@ static PHP_HTTP_FILTER_FUNCTION(zlib) nxt = ptr->next; php_stream_bucket_unlink(ptr TSRMLS_CC); - php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len); + if (SUCCESS != php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len)) { + return PSFS_ERR_FATAL; + } #if DBG_FILTER fprintf(stderr, "update: deflate (-> %zu) (w: %zu, r: %zu)\n", encoded_len, stream->writepos, stream->readpos); @@ -322,7 +324,9 @@ static PHP_HTTP_FILTER_FUNCTION(zlib) char *encoded = NULL; size_t encoded_len = 0; - php_http_encoding_stream_flush(buffer, &encoded, &encoded_len); + if (SUCCESS != php_http_encoding_stream_flush(buffer, &encoded, &encoded_len)) { + return PSFS_ERR_FATAL; + } #if DBG_FILTER fprintf(stderr, "flush: deflate (-> %zu)\n", encoded_len); @@ -340,7 +344,9 @@ static PHP_HTTP_FILTER_FUNCTION(zlib) char *encoded = NULL; size_t encoded_len = 0; - php_http_encoding_stream_finish(buffer, &encoded, &encoded_len); + if (SUCCESS != php_http_encoding_stream_finish(buffer, &encoded, &encoded_len)) { + return PSFS_ERR_FATAL; + } #if DBG_FILTER fprintf(stderr, "finish: deflate (-> %zu)\n", encoded_len);