From d4921496a01f91387e6684a0ea45fe0e1808abe0 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 8 Jan 2026 23:40:04 +0300
Subject: [PATCH] stb_image.h (stbi__start_mem): initialize io.skip and io.eof
to NULL
Patch authored by @NBickford-NV: https://github.com/miniupnp/stb/pull/1
c.f.: https://github.com/nothings/stb/pull/1751
---
src/stb_image.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/stb_image.h b/src/stb_image.h
index 5b393bdc..7e8a8276 100644
--- a/src/stb_image.h
+++ b/src/stb_image.h
@@ -888,6 +888,8 @@ static void stbi__refill_buffer(stbi__context *s);
static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len)
{
s->io.read = NULL;
+ s->io.skip = NULL;
+ s->io.eof = NULL;
s->read_from_callbacks = 0;
s->callback_already_read = 0;
s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer;