STRBUF: fix sanity check when resetting the buffer pointer.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 21 Oct 2012 17:52:09 +0000 (19:52 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 21 Oct 2012 17:52:09 +0000 (19:52 +0200)
libcitadel/lib/stringbuf.c

index 968fe9793784d869e36f8d967439ea9e694616be..9354c91f1dcc69bef09af46231c7a43badea076e 100644 (file)
@@ -4648,9 +4648,12 @@ int StrBufReadBLOBBuffered(StrBuf *Blob,
        int nSuccessLess = 0;
        int MaxTries;
 
-       if ((Blob == NULL) || (*fd == -1) || (IOBuf == NULL) || (Pos == NULL))
+       if ((Blob == NULL)  ||
+           (*fd == -1)     ||
+           (IOBuf == NULL) ||
+           (Pos == NULL))
        {
-               if (*Pos != NULL)
+               if (Pos != NULL)
                        *Pos = NULL;
                *Error = ErrRBB_BLOBFPreConditionFailed;
                return -1;