You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In commit 0b368ea we are left with the following code:
/* Get the name for the Q NDF for this block. Start of with "Q" followed by the block index. */iblock++;
nc=sprintf( ndfname, "Q%d", iblock );
/* Append the subarray name to the NDF name. */nc+=sprintf( ndfname+nc, "_%s", subarray );
/* Append the chunk index to the NDF name. */nc+=sprintf( ndfname+nc, "_%d", (int) ichunk );
in smurf_calcqu.c. The second two lines were historically protected by if-statements and so were distinct. Now this could all be done in a single sprintf. Furthermore, one_snprintf should be used to protect against buffer overflow.
There are many unprotected sprintf uses in SMURF. Particular care should be taken when using %s.
The text was updated successfully, but these errors were encountered:
In commit 0b368ea we are left with the following code:
in
smurf_calcqu.c
. The second two lines were historically protected byif
-statements and so were distinct. Now this could all be done in a singlesprintf
. Furthermore,one_snprintf
should be used to protect against buffer overflow.There are many unprotected
sprintf
uses in SMURF. Particular care should be taken when using%s
.The text was updated successfully, but these errors were encountered: