pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
164faae
)
fix minor valgrind read error
author
Hong Shick Pak
<hong@hspak.com>
Thu, 6 Nov 2014 05:33:20 +0000
(
00:33
-0500)
committer
Hong Shick Pak
<hong@hspak.com>
Thu, 6 Nov 2014 05:33:20 +0000
(
00:33
-0500)
src/cstring.c
patch
|
blob
|
history
diff --git
a/src/cstring.c
b/src/cstring.c
index
d321260
..
558a786
100644
(file)
--- a/
src/cstring.c
+++ b/
src/cstring.c
@@
-76,7
+76,7
@@
void cstring_strip(cstring_t *self, int pos, int len) {
}
return;
}
- memmove(&self->text[pos], &self->text[pos+len], self->size - pos);
+ memmove(&self->text[pos], &self->text[pos+len], self->size - pos
- len+1
);
self->size -= len;
}