| Message ID | 20260304164904.15743-1-gert@greenie.muc.de |
|---|---|
| State | New |
| Headers | show |
| Series | [Openvpn-devel,v5] push: Improve check of vsnprintf return value | expand |
Again, straight forward enough, and BB confirms "all green".
Your patch has been applied to the master branch.
commit 4523e506bd2978c78a29824ce471c0518e85cb6c
Author: Frank Lichtenheld
Date: Wed Mar 4 17:48:58 2026 +0100
push: Improve check of vsnprintf return value
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1502
Message-Id: <20260304164904.15743-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35905.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/push.c b/src/openvpn/push.c index d13b24a..a948973 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -800,11 +800,6 @@ gc_free(&gc); } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif - bool send_push_reply(struct context *c, struct push_list *per_client_push_list) { @@ -936,7 +931,7 @@ va_start(arglist, format); len = vsnprintf(tmp, sizeof(tmp), format, arglist); va_end(arglist); - if (len > sizeof(tmp) - 1) + if (len < 0 || len >= (int)sizeof(tmp)) { return false; } @@ -944,10 +939,6 @@ return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - void push_reset(struct options *o) {