[vlc-commits] memstream: fix search-replace error
Rémi Denis-Courmont
git at videolan.org
Wed Sep 7 14:49:39 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 7 15:48:58 2016 +0300| [724a57fbd99a3792cde696cdcdfa82bf5e94c8df] | committer: Rémi Denis-Courmont
memstream: fix search-replace error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=724a57fbd99a3792cde696cdcdfa82bf5e94c8df
---
src/text/memstream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/text/memstream.c b/src/text/memstream.c
index 8d734f4..3bfd2e9 100644
--- a/src/text/memstream.c
+++ b/src/text/memstream.c
@@ -126,7 +126,7 @@ size_t vlc_memstream_write(struct vlc_memstream *ms, const void *ptr,
size_t len)
{
char *base = realloc(ms->ptr, ms->length + len + 1u);
- if (ptr == NULL)
+ if (unlikely(base == NULL))
goto error;
memcpy(base + ms->length, ptr, len);
More information about the vlc-commits
mailing list