mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
MFH: zero-terminate strings produced with FORCE_DEFLATE
This commit is contained in:
parent
3d97f45bc4
commit
e24fe395a2
@ -820,6 +820,8 @@ PHP_FUNCTION(gzencode)
|
||||
trailer[6] = (char) (stream.total_in >> 16) & 0xFF;
|
||||
trailer[7] = (char) (stream.total_in >> 24) & 0xFF;
|
||||
trailer[8] = '\0';
|
||||
} else {
|
||||
s2[stream.total_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER_LENGTH : 0)] = '\0';
|
||||
}
|
||||
RETURN_STRINGL(s2, stream.total_out + GZIP_HEADER_LENGTH + (coding == CODING_GZIP ? GZIP_FOOTER_LENGTH : 0), 0);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user