Merge pull request #3916 from facebook/no_sprintf

removed sprintf usage from zstdcli.c
This commit is contained in:
Yann Collet
2024-02-27 13:28:32 -08:00
committed by GitHub
+3 -2
View File
@@ -1148,7 +1148,6 @@ int main(int argCount, const char* argv[])
argument++;
while (argument[0]!=0) {
char shortArgument[3];
#ifndef ZSTD_NOCOMPRESS
/* compression Level */
@@ -1281,11 +1280,13 @@ int main(int argCount, const char* argv[])
/* unknown command */
default :
sprintf(shortArgument, "-%c", argument[0]);
{ char shortArgument[3] = {'-', 0, 0};
shortArgument[1] = argument[0];
badUsage(programName, shortArgument);
CLEAN_RETURN(1);
}
}
}
continue;
} /* if (argument[0]=='-') */