From: Frédéric Marchal Date: Thu, 9 Jul 2009 12:12:43 +0000 (+0000) Subject: Applied debian patch: opensuse_3_too_small_font_buffer.patch X-Git-Tag: v2_2_6~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=933aca1912c62b5430211ae61c5fdf2910b8b23f;p=thirdparty%2Fsarg.git Applied debian patch: opensuse_3_too_small_font_buffer.patch --- diff --git a/getconf.c b/getconf.c index ee1eeb0..f2fb8cc 100644 --- a/getconf.c +++ b/getconf.c @@ -188,7 +188,8 @@ void parmtest(char *buf) printf("SARG: Maybe you have a broken record or garbage in header_font_size parameter.\n"); exit(1); } - strcpy(HeaderFontSize,buf); + strncpy(HeaderFontSize,buf,sizeof(HeaderFontSize)-1); + HeaderFontSize[sizeof(HeaderFontSize)-1]=0; fixnone(HeaderFontSize); return; } diff --git a/include/conf.h b/include/conf.h index 1aff9cc..6a9063f 100755 --- a/include/conf.h +++ b/include/conf.h @@ -214,7 +214,7 @@ char ShowSargLogo[5]; char ParsedOutputLog[MAXLEN]; char ParsedOutputLogCompress[255]; char DisplayedValues[20]; -char HeaderFontSize[4]; +char HeaderFontSize[5]; char TitleFontSize[5]; char wwwDocumentRoot[MAXLEN]; char ExternalCSSFile[MAXLEN];