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

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;