From b3f3bdf8d129fb7de38f150f68a5ed59a4d21a25 Mon Sep 17 00:00:00 2001 From: ado Date: Sun, 25 Feb 2024 10:54:56 +0100 Subject: [PATCH] [skip ci] Update ssp.hpp --- ssp.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssp.hpp b/ssp.hpp index d478afe..7054d36 100644 --- a/ssp.hpp +++ b/ssp.hpp @@ -667,7 +667,7 @@ ssize_t get_line_file(char** lineptr, size_t* n, FILE* fp) { if (*lineptr == nullptr || *n < sizeof(buff)) { size_t new_n = sizeof(buff); - lineptr = static_cast(strict_realloc(*lineptr, new_n)); + *lineptr = static_cast(strict_realloc(*lineptr, new_n)); *n = new_n; } @@ -680,7 +680,8 @@ ssize_t get_line_file(char** lineptr, size_t* n, FILE* fp) { if (*n <= buff_used + line_used) { size_t new_n = *n * 2; - lineptr = static_cast(realloc(*lineptr, new_n)); + + *lineptr = static_cast(strict_realloc(*lineptr, new_n)); *n = new_n; }