The Samba-Bugzilla – Attachment 13159 Details for
Bug 12746
possible negative array access in debug_backends_log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.6.next, 4.5.next.
0001-lib-debug-Avoid-negative-array-access.patch (text/plain), 1.10 KB, created by
Jeremy Allison
on 2017-04-19 00:32:41 UTC
(
hide
)
Description:
git-am fix for 4.6.next, 4.5.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2017-04-19 00:32:41 UTC
Size:
1.10 KB
patch
obsolete
>From d4687bb2efa0b6c194a02ea99bf25bb95c59ef33 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Mon, 17 Apr 2017 14:09:24 -0700 >Subject: [PATCH] lib: debug: Avoid negative array access. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Report and patch from Hanno Böck <hanno@hboeck.de>. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12746 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Martin Schwenke <martin@meltin.net> >Reviewed-by: Andreas Schneider <asn@samba.org> >(cherry picked from commit 600f8787e3b605c9f3e8f724c726e63157ee9efc) >--- > lib/util/debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/util/debug.c b/lib/util/debug.c >index 37582dbd1cc..8f0c383b15e 100644 >--- a/lib/util/debug.c >+++ b/lib/util/debug.c >@@ -397,7 +397,7 @@ static void debug_backends_log(const char *msg, int msg_level) > * a buffer without the newline character. > */ > len = MIN(strlen(msg), FORMAT_BUFR_SIZE - 1); >- if (msg[len - 1] == '\n') { >+ if ((len > 0) && (msg[len - 1] == '\n')) { > len--; > } > >-- >2.12.2.816.g2cccc81164-goog >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
asn
:
review+
Actions:
View
Attachments on
bug 12746
:
13154
| 13159