Skip to content

Commit eb0d34f

Browse files
committed
Return false when xmlOutputBufferClose() fails in C14NFile()
1 parent 45c707c commit eb0d34f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎ext/dom/node.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,11 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
23312331

23322332
bytes = xmlOutputBufferClose(buf);
23332333
if (mode == 1 && (ret >= 0)) {
2334-
RETVAL_LONG(bytes);
2334+
if (bytes < 0) {
2335+
RETVAL_FALSE;
2336+
} else {
2337+
RETVAL_LONG(bytes);
2338+
}
23352339
}
23362340
}
23372341

0 commit comments

Comments
 (0)