]> code.citadel.org Git - citadel.git/commitdiff
* catch empty source string condition
authorWilfried Göesgens <willi@citadel.org>
Wed, 20 Aug 2008 10:17:04 +0000 (10:17 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 20 Aug 2008 10:17:04 +0000 (10:17 +0000)
libcitadel/debian/files
libcitadel/lib/stringbuf.c

index d2ac0561c0b0a03d7eab551e7db9c29484f59207..73fc3064e0412a561172b5a5c47e4c6ec0596e3b 100644 (file)
@@ -1,3 +1,3 @@
-libcitadel1_7.38-8_i386.deb libs optional
-libcitadel1-dbg_7.38-8_i386.deb libdevel optional
-libcitadel-dev_7.38-8_i386.deb libdevel optional
+libcitadel1_7.38-8_amd64.deb libs optional
+libcitadel1-dbg_7.38-8_amd64.deb libdevel optional
+libcitadel-dev_7.38-8_amd64.deb libdevel optional
index d9302352e7ab843a2e166cdde513a57a8627f621..51e14a960d113561cd9dedaaef81f1c71d6af81b 100644 (file)
@@ -280,6 +280,9 @@ void StrBufUrlescAppend(StrBuf *OutBuf, const StrBuf *In, const char *PlainIn)
                len = In->BufUsed;
        }
 
+       if (len == 0) 
+               return;
+
        pt = OutBuf->buf + OutBuf->BufUsed;
        pte = OutBuf->buf + OutBuf->BufSize - 4; /**< we max append 3 chars at once plus the \0 */
 
@@ -339,6 +342,9 @@ long StrEscAppend(StrBuf *Target, const StrBuf *Source, const char *PlainIn, int
                len = Source->BufUsed;
        }
 
+       if (len == 0) 
+               return;
+
        bptr = Target->buf + Target->BufUsed;
        eptr = Target->buf + Target->BufSize - 6; /* our biggest unit to put in...  */
 
@@ -431,6 +437,10 @@ void StrMsgEscAppend(StrBuf *Target, StrBuf *Source, const char *PlainIn)
                eiptr = aptr + Source->BufUsed;
                len = Source->BufUsed;
        }
+
+       if (len == 0) 
+               return;
+
        eiptr = Target->buf + Target->BufSize - 6; 
        tptr = Target->buf + Target->BufUsed;