From: Jeremy Allison Date: Mon, 16 Jul 2007 18:17:19 +0000 (+0000) Subject: r23902: Fix uninitialized read in devicetype noticed by Volker. X-Git-Tag: samba-misc-tags/initial-v3-2-unstable~704 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c23939731654440d2f008e44e11371eaddf014;p=thirdparty%2Fsamba.git r23902: Fix uninitialized read in devicetype noticed by Volker. Jeremy --- diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 8b6a164a665..2421e2ffd98 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -529,7 +529,7 @@ int reply_tcon_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt } p += srvstr_pull_talloc(ctx, inbuf, SVAL(inbuf, smb_flg2), &client_devicetype, p, - 6, STR_ASCII); + MIN(6,smb_bufrem(inbuf, p)), STR_ASCII); if (client_devicetype == NULL) { TALLOC_FREE(ctx);