projects
/
idzebra-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:
2c120c0
)
Fixed rec_cp. Did not copy the 0-termiante info buffers
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 10 May 2006 12:30:02 +0000
(12:30 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 10 May 2006 12:30:02 +0000
(12:30 +0000)
index/recindex.c
patch
|
blob
|
history
diff --git
a/index/recindex.c
b/index/recindex.c
index
b9cd407
..
a888c85
100644
(file)
--- a/
index/recindex.c
+++ b/
index/recindex.c
@@
-1,5
+1,5
@@
-/* $Id: recindex.c,v 1.48 2006-05-10 08:13:22 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: recindex.c,v 1.49 2006-05-10 12:30:02 adam Exp $
+ Copyright (C) 1995-2006
Index Data ApS
This file is part of the Zebra server.
Index Data ApS
This file is part of the Zebra server.
@@
-955,8
+955,9
@@
Record rec_cp(Record rec)
else
{
n->size[i] = rec->size[i];
else
{
n->size[i] = rec->size[i];
- n->info[i] = (char *) xmalloc(rec->size[i]);
+ n->info[i] = (char *) xmalloc(rec->size[i]+1);
memcpy(n->info[i], rec->info[i], rec->size[i]);
memcpy(n->info[i], rec->info[i], rec->size[i]);
+ n->info[i][rec->size[i]] = '\0';
}
return n;
}
}
return n;
}