libcli: continue to read from the socket even if the size is 0
[amitay/samba.git] / source4 / libcli / dgram / dgramsocket.c
index 3f06dc72bd186ef1d03d2ef6e94959a133a10c51..cd6d3e4c745bf5069cf8cac8566cd23cb645ac77 100644 (file)
@@ -48,7 +48,7 @@ static void dgm_socket_recv(struct nbt_dgram_socket *dgmsock)
        }
 
        blob = data_blob_talloc(tmp_ctx, NULL, dsize);
-       if (blob.data == NULL) {
+       if ((dsize != 0) && (blob.data == NULL)) {
                talloc_free(tmp_ctx);
                return;
        }