From b4366f6c37457d082478e72f05040eb13df94b64 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Jul 2007 18:17:19 +0000 Subject: r23902: Fix uninitialized read in devicetype noticed by Volker. Jeremy (This used to be commit 98c23939731654440d2f008e44e11371eaddf014) --- source3/smbd/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 8b6a164a66..2421e2ffd9 100644 --- a/source3/smbd/reply.c +++ b/source3/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); -- cgit