Google's OSS Fuzz project found input for libyaml that was capable of
triggering an uninitialized value crash.
Patch provided by Alex Gaynor
/* Check if we are at the end of the scalar. */
/* Check if we are at the end of the scalar. */
+ /* Fix for crash unitialized value crash
+ * Credit for the bug and input is to OSS Fuzz
+ * Credit for the fix to Alex Gaynor
+ */
+ if (!CACHE(parser, 1)) goto error;
if (CHECK(parser->buffer, single ? '\'' : '"'))
break;
if (CHECK(parser->buffer, single ? '\'' : '"'))
break;