public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Subject: Re: [PATCH olang] string_view: fix stack buffer overflow on to_u32
Date: Sat, 2 Mar 2024 21:06:10 +0100	[thread overview]
Message-ID: <4oi5xvshvpbbw4uoo5rt4kovuvfgeg6od3x6bdgjzeewzxt2u7@rkpve36clmjz> (raw)
In-Reply-To: <20240302200159.919303-1-johnny@johnnyrichard.com>

Opss, lint problem.  Fix it please...

----->8-----
Subject: [PATCH olang] fixup! string_view: fix stack buffer overflow on to_u32


diff --git a/tests/unit/string_view_test.c b/tests/unit/string_view_test.c
index fe3dacb..7a6776c 100644
--- a/tests/unit/string_view_test.c
+++ b/tests/unit/string_view_test.c
@@ -48,7 +48,7 @@ string_view_to_u32_test(const MunitParameter params[], void *user_data_or_fixtur
 
     assert_uint32(string_view_to_u32(str), ==, 69);
 
-    str = (string_view_t) { .chars = "39;", .size = 2 };
+    str = (string_view_t){ .chars = "39;", .size = 2 };
 
     assert_uint32(string_view_to_u32(str), ==, 39);
 



  parent reply	other threads:[~2024-03-02 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-02 20:01 Johnny Richard
2024-03-02 19:02 ` [olang/patches/.build.yml] build failed builds.sr.ht
2024-03-02 20:06 ` Johnny Richard [this message]
2024-03-02 19:18   ` [PATCH olang] string_view: fix stack buffer overflow on to_u32 Carlos Maniero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4oi5xvshvpbbw4uoo5rt4kovuvfgeg6od3x6bdgjzeewzxt2u7@rkpve36clmjz \
    --to=johnny@johnnyrichard.com \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox