Out-of-bounds Key Type #1

Closed
opened 2025-04-21 14:42:45 -04:00 by idk · 0 comments
Owner

An out-of-bounds key type accidentally slipped into dgrams.c

Proposed patch:

From: obscuratus <obscuratus@mail.i2p>
Date: Sun, 31 Jul 2022 14:27:50 +0000
Subject: [PATCH] Fix out-of-bounds signature type.

Signed-off-by: obscuratus <obscuratus@mail.i2p>
---
 examples/sam3/dgrams.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/sam3/dgrams.c b/examples/sam3/dgrams.c
index 1fe0fc0..44f8ea9 100644
--- a/examples/sam3/dgrams.c
+++ b/examples/sam3/dgrams.c
@@ -46,7 +46,7 @@ int main(int argc, char *argv[]) {
   /** create sam session */
   printf("creating session...\n");
   if (sam3CreateSession(&ses, SAM3_HOST_DEFAULT, SAM3_PORT_DEFAULT, privkey,
-                        SAM3_SESSION_DGRAM, 5, NULL) < 0) {
+                        SAM3_SESSION_DGRAM, 4, NULL) < 0) {
     fprintf(stderr, "FATAL: can't create session\n");
     return 1;
   }
-- 
2.35.1
An out-of-bounds key type accidentally slipped into dgrams.c Proposed patch: ``` From: obscuratus <obscuratus@mail.i2p> Date: Sun, 31 Jul 2022 14:27:50 +0000 Subject: [PATCH] Fix out-of-bounds signature type. Signed-off-by: obscuratus <obscuratus@mail.i2p> --- examples/sam3/dgrams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sam3/dgrams.c b/examples/sam3/dgrams.c index 1fe0fc0..44f8ea9 100644 --- a/examples/sam3/dgrams.c +++ b/examples/sam3/dgrams.c @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { /** create sam session */ printf("creating session...\n"); if (sam3CreateSession(&ses, SAM3_HOST_DEFAULT, SAM3_PORT_DEFAULT, privkey, - SAM3_SESSION_DGRAM, 5, NULL) < 0) { + SAM3_SESSION_DGRAM, 4, NULL) < 0) { fprintf(stderr, "FATAL: can't create session\n"); return 1; } -- 2.35.1 ```
idk closed this issue 2025-04-21 14:42:45 -04:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/libsam3#1
No description provided.