projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00c29e5
)
Null terminate a null-terminated string
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 6 Mar 2006 08:11:41 +0000
(08:11 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 6 Mar 2006 08:11:41 +0000
(08:11 +0000)
util/yaz-xmlquery.c
patch
|
blob
|
history
diff --git
a/util/yaz-xmlquery.c
b/util/yaz-xmlquery.c
index
6612183
..
12a9c47
100644
(file)
--- a/
util/yaz-xmlquery.c
+++ b/
util/yaz-xmlquery.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: yaz-xmlquery.c,v 1.1 2006-02-23 10:40:59 adam Exp $
+ * $Id: yaz-xmlquery.c,v 1.2 2006-03-06 08:11:41 adam Exp $
*/
#include <stdlib.h>
@@
-143,7
+143,8
@@
void xmlfiletopqf(const char *xmlfile)
exit(1);
}
rewind(f);
- xmlstr = xmalloc(sz);
+ xmlstr = xmalloc(sz+1);
+ xmlstr[sz] = '\0';
fread(xmlstr, sz, 1, f);
fclose(f);