Merge branch 'master' of thejh.net:quakecontrol master
authorJann Horn <jannhorn@googlemail.com>
Sun, 4 May 2014 18:35:52 +0000 (20:35 +0200)
committerJann Horn <jannhorn@googlemail.com>
Sun, 4 May 2014 18:35:52 +0000 (20:35 +0200)
compile.sh
loadmap.c

index 3078b94..54ef5d6 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
-gcc -g -O2 -o showmaps showmaps.c common.c -ljh -std=gnu99
-gcc -g -O2 -o loadmap loadmap.c common.c -ljh -std=gnu99
+gcc -g -O2 -o showmaps showmaps.c common.c -ljh -lev -std=gnu99
+gcc -g -O2 -o loadmap loadmap.c common.c -ljh -lev -std=gnu99
 
index bc6eb9b..d060a34 100644 (file)
--- a/loadmap.c
+++ b/loadmap.c
@@ -7,6 +7,7 @@ char *map;
 
 void check_map_name(void) {
   if (map == NULL) senderr("missing query string", false);
+  if (strlen(map) > 100) senderr("map string is too long - no stack/heap overlap issue for you!", false);
   for (char *p = map; *p; p++) {
     if (*p >= 'a' && *p <= 'z') continue;
     if (*p >= 'A' && *p <= 'Z') continue;
@@ -29,4 +30,4 @@ int main(void) {
      "\nX-Frame-Options: DENY"
      "\n");
   exit(0);
-}
\ No newline at end of file
+}