File: CVE-2023-0437.patch

package info (click to toggle)
mongo-c-driver 1.23.1-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 41,364 kB
  • sloc: ansic: 176,588; javascript: 7,954; python: 4,498; sh: 136; makefile: 32; xml: 10; cpp: 2
file content (29 lines) | stat: -rw-r--r-- 878 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From fd3a978b35cac8f3c78c4d9a1b08fd5aa4d440b8 Mon Sep 17 00:00:00 2001
From: Kevin Albertson <kevin.albertson@mongodb.com>
Date: Mon, 30 Oct 2023 18:01:30 +0000
Subject: [PATCH] CDRIVER-4747 use `size_t` consistently in
 `bson_utf8_validate` (#1458)

Origin: https://github.com/mongodb/mongo-c-driver/commit/fd3a978b35cac8f3c78c4d9a1b08fd5aa4d440b8
---
 src/libbson/src/bson/bson-utf8.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libbson/src/bson/bson-utf8.c b/src/libbson/src/bson/bson-utf8.c
index d7e9168c96..ac7a1bddfe 100644
--- a/src/libbson/src/bson/bson-utf8.c
+++ b/src/libbson/src/bson/bson-utf8.c
@@ -118,8 +118,8 @@ bson_utf8_validate (const char *utf8, /* IN */
    bson_unichar_t c;
    uint8_t first_mask;
    uint8_t seq_length;
-   unsigned i;
-   unsigned j;
+   size_t i;
+   size_t j;
 
    BSON_ASSERT (utf8);
 
-- 
2.39.5