Prevented a quite unlikely buffer overflow by argument. Coverity CID 21827.

This commit is contained in:
Thomas Schmitt 2015-10-28 19:22:34 +00:00
parent 0f657077af
commit d32dbe37fe
1 changed files with 6 additions and 0 deletions

View File

@ -3103,6 +3103,12 @@ see_cdrskin_eng_html:;
o->abort_handler= 2;
} else if(strncmp(argv[i],"fallback_program=",17)==0) {
if(strlen(argv[i] + 17) >= sizeof(o->fallback_program)) {
fprintf(stderr,
"cdrskin: FATAL : fallback_program=... too long (max. %d characters)\n",
(int) sizeof(o->fallback_program) - 1);
{ret= 0; goto ex;}
}
strcpy(o->fallback_program,argv[i]+17);
} else if(strcmp(argv[i],"--no_abort_handler")==0) {