summaryrefslogtreecommitdiffstats
path: root/src/dfxml.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:03:37 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:03:37 +0100
commit86308a25e11781e6d78dd72e16991582295dd318 (patch)
tree5c1968fcc9a2d23b2821877cedc6a15943c67167 /src/dfxml.c
parentf9abcbb71b683d98bf0658945b5fb0cf05a3b790 (diff)
src/dfxml.c: fix check for filename
Diffstat (limited to 'src/dfxml.c')
-rw-r--r--src/dfxml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dfxml.c b/src/dfxml.c
index f04e6cd..ce9c1e5 100644
--- a/src/dfxml.c
+++ b/src/dfxml.c
@@ -307,7 +307,7 @@ void xml_log_file_recovered(const file_recovery_t *file_recovery)
uint64_t file_size=0;
if(xml_handle==NULL)
return;
- if(file_recovery->filename==NULL)
+ if(file_recovery==NULL || file_recovery->filename[0]=='\0')
return;
xml_push("fileobject", "");
xml_out2s("filename", relative_name(file_recovery->filename));
@@ -366,7 +366,7 @@ void xml_log_file_recovered2(const alloc_data_t *space, const file_recovery_t *f
{
if(xml_handle==NULL)
return;
- if(file_recovery->filename==NULL)
+ if(file_recovery==NULL || file_recovery->filename[0]=='\0')
return;
xml_push("fileobject", "");
xml_out2s("filename", relative_name(file_recovery->filename));