Skip to contentSkip to conversation

make %x destination unsigned

PATCH In review Heiko Hund 3 participants 3 messages May 12, 2022 – Jun 28, 2022

lore
Share & tools
lore

Heiko Hund

author
#0 lore raw

PATCH 1/1 make %x destination unsigned

The %x specifier requires for the argument to be an unsigned int.

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 9ff384d0..3dbd3fab 100644
@@ -1104,7 +1104,7 @@ parse_hash_fingerprint(const char *str, int nbytes, int msglevel, struct gc_aren
     ALLOC_OBJ_CLEAR_GC(ret, struct verify_hash_list, gc);
 
     char term = 0;
-    int byte;
+    unsigned int byte;
 
     while (*cp && i < nbytes)
     {
Signature · 1 line
2.32.0
Acked-by on v1 1/1
#1 lore raw

Trivial and looks correct to me according to the
man sscanf.

Quoted 22 lines · Heiko Hund

The %x specifier requires for the argument to be an unsigned int.

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 9ff384d0..3dbd3fab 100644
@@ -1104,7 +1104,7 @@ parse_hash_fingerprint(const char *str, int nbytes, int msglevel, struct gc_aren
     ALLOC_OBJ_CLEAR_GC(ret, struct verify_hash_list, gc);
 
     char term = 0;
-    int byte;
+    unsigned int byte;
 
     while (*cp && i < nbytes)
     {
Signature · 1 line
2.32.0
#2 lore raw
In reply to Heiko Hund

Your patch has been applied to the master branch.

commit 2f702291484ccecba455b039bc4c04b4cf87e972

Author: Heiko Hund
Date:   Fri May 13 01:19:01 2022 +0200
     make %x destination unsigned

     Signed-off-by: Heiko Hund <[email protected]...>
     Acked-by: Frank Lichtenheld <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg24336.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering