Prevented a string overflow in case of program error. Coverity CID 28767.

This commit is contained in:
Thomas Schmitt 2015-11-04 11:44:32 +00:00
parent 453940395b
commit cf7ebd6316
2 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@ int Xorriso_set_problem_status(struct XorrisO *xorriso, char *severity,
static int complaints= 0, complaint_limit= 5;
#endif
if(severity[0])
if(severity[0] && strlen(severity) < sizeof(xorriso->problem_status_text))
sev_text= severity;
ret= Xorriso__text_to_sev(sev_text, &sev, 0);
if(ret<=0)

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.04.110102"
#define Xorriso_timestamP "2015.11.04.114353"