Fix buffer allocation bug in lnkCalc.c
This commit is contained in:
1 parent
611cb3f52e
commit
23cef0339e
1 file changed
+1
-1
@@ -185,7 +185,7 @@ static jlif_result lnkCalc_string(jlink *pjlink, const char *val, size_t len)
|
||||
return jlif_stop;
|
||||
}
|
||||
|
||||
postbuf = malloc(INFIX_TO_POSTFIX_SIZE(len));
|
||||
postbuf = malloc(INFIX_TO_POSTFIX_SIZE(len+1));
|
||||
if (!postbuf) {
|
||||
errlogPrintf("lnkCalc: Out of memory\n");
|
||||
return jlif_stop;
|
||||
|
||||
Reference in new issue
Block a user