nixpkgs/pkgs/development/libraries/libyaml/cve-2013-6393_a.patch

11 lines
390 B
Diff

--- a/src/scanner.c
+++ a/src/scanner.c
@@ -2574,7 +2574,7 @@
/* Resize the string to include the head. */
- while (string.end - string.start <= (int)length) {
+ while ((size_t)(string.end - string.start) <= length) {
if (!yaml_string_extend(&string.start, &string.pointer, &string.end)) {
parser->error = YAML_MEMORY_ERROR;
goto error;