From ed246d4bc47ecc5872f6105a5b2791549842351a Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Mon, 23 Jan 2017 20:09:19 -0800 Subject: [PATCH] Fix NULL pointer dereference getting driectory property --- xar/src/xar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xar/src/xar.c b/xar/src/xar.c index f045f39..bf66ea9 100644 --- a/xar/src/xar.c +++ b/xar/src/xar.c @@ -1388,7 +1388,7 @@ static int extract(const char *filename, int arglen, char *args[]) { const char *prop = NULL; int deferred = 0; if( xar_prop_get(f, "type", &prop) == 0 ) { - if( strcmp(prop, "directory") == 0 ) { + if( prop != NULL && strcmp(prop, "directory") == 0 ) { if (!ToStdout) { struct lnode *tmpl = calloc(sizeof(struct lnode),1); tmpl->str = (char *)f;