billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=29cf9139510cfe44cc67078ad7cddad717196386

commit 29cf9139510cfe44cc67078ad7cddad717196386
Author: Boris Faure <[email protected]>
Date:   Sun Mar 29 18:45:00 2015 +0200

    termio: make code more readable. Closes CID1291865
---
 src/bin/termio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index dc5c2dd..527def6 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -1947,7 +1947,7 @@ _sb_add(struct termio_sb *sb, const char *s, size_t len)
 {
    size_t new_len = sb->len + len;
 
-   if (new_len >= sb->alloc)
+   if ((new_len >= sb->alloc) || !sb->buf)
      {
         size_t new_alloc = ((new_len + 15) / 16) * 24;
         char *new_buf;

-- 


Reply via email to