commit | 21014c4c7e6f07a91a5339ee715aa2316f6c9868 | [log] [tgz] |
---|---|---|
author | natalie.chen <natalie.chen@mediatek.com> | Mon Sep 03 21:57:53 2018 +0800 |
committer | natalie.chen <natalie.chen@mediatek.com> | Mon Sep 03 21:58:39 2018 +0800 |
tree | fd1c1c28de992b9128aece4ce0c9e65fd868d732 | |
parent | 0453c5a1e85aa7663fdc4a72dfe80796bf62bcde [diff] |
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) == '/')