Fix the prevent issue.
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 24 Jan 2013 05:37:14 +0000 (05:37 +0000)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 24 Jan 2013 05:37:14 +0000 (05:37 +0000)
Change-Id: Ia384b56d717e64280a5a9231f6b32f78d0f4aaa1

packaging/liblivebox.spec
src/livebox.c

index 01ddd60..f4156e4 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox
 Summary: Library for the development of a livebox 
-Version: 0.1.10
+Version: 0.1.11
 Release: 1
 Group: main/app
 License: Flora License
index b2e6f4d..61a20b5 100644 (file)
@@ -287,7 +287,7 @@ EAPI char *livebox_util_nl2br(const char *str)
        if (!len)
                return NULL;
 
-       ret = malloc(len);
+       ret = malloc(len + 1);
        if (!ret)
                return NULL;
 
@@ -300,7 +300,7 @@ EAPI char *livebox_util_nl2br(const char *str)
                                char *tmp;
                                len += len;
 
-                               tmp = realloc(ret, len);
+                               tmp = realloc(ret, len + 1);
                                if (!tmp) {
                                        free(ret);
                                        return NULL;