home · contact · privacy
Server: Don't segfault on lack of THINGS_HERE arguments.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 7 Dec 2014 02:21:34 +0000 (03:21 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 7 Dec 2014 02:21:34 +0000 (03:21 +0100)
src/server/run.c

index 339a849fbe190a00d701e10119df3be032d9576c..9163ee05b4d125d22040be802ee44ba02e096c9e 100644 (file)
@@ -212,7 +212,7 @@ static uint8_t parse_command_meta(char * tok0)
     {
         char * tok1 = token_from_line(NULL);
         char * tok2 = token_from_line(NULL);
     {
         char * tok1 = token_from_line(NULL);
         char * tok2 = token_from_line(NULL);
-        if (!parsetest_int(tok1, '8') && !parsetest_int(tok2, '8'))
+        if (tok1&&tok2 && !parsetest_int(tok1, '8')&&!parsetest_int(tok2, '8'))
         {
             send_to_outfile("THINGS_HERE START\n", 1);
             struct Thing * t;
         {
             send_to_outfile("THINGS_HERE START\n", 1);
             struct Thing * t;