diff --git a/src/HeaderParser.c b/src/HeaderParser.c index cb4cf77..9f03ac5 100644 --- a/src/HeaderParser.c +++ b/src/HeaderParser.c @@ -371,7 +371,7 @@ HeaderParse(Stream * stream, HeaderExpr * expr) StrEquals(word, "elif") || StrEquals(word, "error")) { - int pC; + int pC = 0; Free(word); expr->data.text[i] = ' '; diff --git a/src/Json.c b/src/Json.c index 1068f49..a9f8ce9 100644 --- a/src/Json.c +++ b/src/Json.c @@ -535,7 +535,7 @@ JsonDecodeString(Stream * in) /* Move the output of StrUtf8Encode() into our * local buffer */ - strncpy(a, utf8Ptr, sizeof(a)); + strncpy(a, utf8Ptr, sizeof(a) - 1); Free(utf8Ptr); break; default: