check for null pointer
diff --git a/src/backend.c b/src/backend.c
index 4615c90..0ab73b6 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -232,7 +232,7 @@
 			}
 			end--;
 		}
-		if (!strncmp(p, "git-receive-pack", 16) || !strncmp(p, "git-upload-pack", 15)) {
+		if (p != NULL && (!strncmp(p, "git-receive-pack", 16) || !strncmp(p, "git-upload-pack", 15))) {
 			// we have git request here
 			// get rid of redundant '/'
 			while ((end - start) > 1 && *(start+1) == '/')