X-Git-Url: http://git.thejh.net/?p=quakecontrol.git;a=blobdiff_plain;f=loadmap.c;h=d060a34e930d312fafaa185c33ccb6ff7f0f914a;hp=82b3f6daac7d24ac97180d7b18751ec2bf9f4d77;hb=HEAD;hpb=a50944bd9bf1edd5d2816f2e5e92ccb4a18fa6aa diff --git a/loadmap.c b/loadmap.c index 82b3f6d..d060a34 100644 --- a/loadmap.c +++ b/loadmap.c @@ -1,9 +1,13 @@ +// Copyright (2013) Jann Horn +// This code is licensed under the AGPLv3. + #include "common.h" 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; @@ -26,4 +30,4 @@ int main(void) { "\nX-Frame-Options: DENY" "\n"); exit(0); -} \ No newline at end of file +}