json.c: use ENOMEM instead of EOVERFLOW - json2tsv - JSON to TSV converter
 (HTM) git clone git://git.codemadness.org/json2tsv
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 6bc2f0c4a81a8b4877385d396fac72e931a90e30
 (DIR) parent 3ee79e477e039f8028f1c47e253deeb8d293454a
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Fri, 14 Apr 2023 19:13:12 +0200
       
       json.c: use ENOMEM instead of EOVERFLOW
       
       Diffstat:
         M json.c                              |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/json.c b/json.c
       @@ -64,7 +64,7 @@ capacity(char **value, size_t *sz, size_t cur, size_t inc)
        
                /* check for addition overflow */
                if (cur > SIZE_MAX - inc) {
       -                errno = EOVERFLOW;
       +                errno = ENOMEM;
                        return -1;
                }
                need = cur + inc;