forked from ibphoenix/tomsfastmath
fp_ident: fix incorrect length in strncat() call.
strncat' last argument is the remaining size of the buffer given in the first argument, not the total buffer length. Reported-by: contact@oppida.fr via clamav #11166 Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
This commit is contained in:
parent
060b2c5697
commit
522a092ffb
@ -74,7 +74,7 @@ const char *fp_ident(void)
|
||||
|
||||
if (sizeof(fp_digit) == sizeof(fp_word)) {
|
||||
strncat(buf, "WARNING: sizeof(fp_digit) == sizeof(fp_word), this build is likely to not work properly.\n",
|
||||
sizeof(buf)-1);
|
||||
sizeof(buf) - strlen(buf) - 1);
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user