Codebase list cyrus-sasl2 / debian/2.1.26.dfsg1-13+deb8u2 debian / patches / 0034_fix_dovecot_authentication.patch
debian/2.1.26.dfsg1-13+deb8u2

Tree @debian/2.1.26.dfsg1-13+deb8u2 (Download .tar.gz)

0034_fix_dovecot_authentication.patch @debian/2.1.26.dfsg1-13+deb8u2raw · history · blame

--- cyrus-sasl2.orig/lib/checkpw.c
+++ cyrus-sasl2/lib/checkpw.c
@@ -587,16 +587,14 @@ static int read_wait(int fd, unsigned de
 	    /* Timeout. */
 	    errno = ETIMEDOUT;
 	    return -1;
-	case +1:
-	    if (FD_ISSET(fd, &rfds)) {
-		/* Success, file descriptor is readable. */
-		return 0;
-	    }
-	    return -1;
 	case -1:
 	    if (errno == EINTR || errno == EAGAIN)
 		continue;
 	default:
+	    if (FD_ISSET(fd, &rfds)) {
+		/* Success, file descriptor is readable. */
+		return 0;
+	    }
 	    /* Error catch-all. */
 	    return -1;
 	}