From c4a5727c2aba9572d0b1941051f7e05cc9eac398 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 17 Feb 2019 09:50:04 +0100 Subject: [PATCH] Fix deref of NULL pointer. --- m-string.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m-string.h b/m-string.h index 09c9fb38..4006d572 100644 --- a/m-string.h +++ b/m-string.h @@ -1120,8 +1120,8 @@ string_it(string_it_t it, const string_t str) { STRINGI_CONTRACT(str); assert(it != NULL); - it->ptr = str->ptr; - it->next_ptr = str->ptr; + it->ptr = string_get_cstr(str); + it->next_ptr = it->ptr; it->u = 0; }