]>
Commit | Line | Data |
---|---|---|
c6ce1e7e MT |
1 | From 794fccca7ffebfba4468bfffc6276b68bbf6afd9 Mon Sep 17 00:00:00 2001 |
2 | From: Simon Kelley <simon@thekelleys.org.uk> | |
3 | Date: Sun, 29 Mar 2015 22:35:44 +0100 | |
697b4f04 | 4 | Subject: [PATCH 066/113] Fix crash in last commit. |
c6ce1e7e MT |
5 | |
6 | --- | |
7 | src/cache.c | 7 ++++--- | |
8 | 1 file changed, 4 insertions(+), 3 deletions(-) | |
9 | ||
10 | diff --git a/src/cache.c b/src/cache.c | |
11 | index 873c5779044c..d7bea574c0d8 100644 | |
12 | --- a/src/cache.c | |
13 | +++ b/src/cache.c | |
14 | @@ -1404,9 +1404,10 @@ int cache_make_stat(struct txt_record *t) | |
15 | static char *sanitise(char *name) | |
16 | { | |
17 | unsigned char *r; | |
18 | - for (r = (unsigned char *)name; *r; r++) | |
19 | - if (!isprint((int)*r)) | |
20 | - return "<name unprintable>"; | |
21 | + if (name) | |
22 | + for (r = (unsigned char *)name; *r; r++) | |
23 | + if (!isprint((int)*r)) | |
24 | + return "<name unprintable>"; | |
25 | ||
26 | return name; | |
27 | } | |
28 | -- | |
29 | 2.1.0 | |
30 |