Prevent crash if logbook "global<xxx>" is accessed and a logbook "global<xxx>" is defined in config file
SVN revision: 1748
This commit is contained in:
+6
-2
@@ -2645,9 +2645,13 @@ int is_logbook(char *logbook)
|
||||
{
|
||||
char str[256];
|
||||
|
||||
if (strieq(logbook, "global"))
|
||||
return 0;
|
||||
|
||||
/* check for 'global group' or 'global_xxx' */
|
||||
strlcpy(str, logbook, sizeof(str));
|
||||
str[6] = 0;
|
||||
return !strieq(str, "global");
|
||||
str[7] = 0;
|
||||
return !strieq(str, "global ");
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user