cpq
81f6acbce7
LFS nits
2026-09-26 12:52:30 +01:00
eunho87
5d4fffbb14
Guard against NULL return in mg_file_printf
...
mg_vmprintf() returns io.buf from a mg_iobuf that starts empty. When the
internal mg_iobuf_resize() allocation fails, the buffer is left NULL and
mg_vmprintf() returns NULL. mg_file_printf() passed that result straight
to strlen(data), dereferencing NULL on allocation failure.
Skip the write when mg_vmprintf() returns NULL and return false, matching
how the rest of the codebase checks mg_calloc()/allocation results.
2026-09-15 10:50:14 +09:00
Sergio R. Caprile
a9df523f76
assorted patches
2026-06-23 13:38:35 -03:00
Sergio R. Caprile
5b023cb85b
Add support for Windriver's Diab v4 (stricter C89)
2025-12-04 13:58:49 -03:00
Sergio R. Caprile
f5e2c68c8b
update examples
2025-06-24 16:26:31 -03:00
Sergey Lyubka
074ef5197b
Introduce mg_calloc
2025-06-24 10:52:44 +01:00
Sergey Lyubka
e0e599ffa1
Fix #2612 - struct mg_str::ptr -> buf
2024-04-16 22:42:45 +01:00
Sergey Lyubka
0e2f3de154
Change mg_file_read() signature: return mg_str
2024-02-16 12:07:35 +00:00
Sergey Lyubka
e0668bc1c0
Allow user specify file in mg_http_upload
2024-02-04 08:56:32 +00:00
Sergey Lyubka
cbfa57a955
Add helper mg_fs_ls()
2024-02-01 18:24:37 +00:00
Sergio R. Caprile
8e14ad0536
Add printf.h
2023-04-07 19:28:00 -03:00
cpq
e48e353066
Restore mg_file_write() to use tmp file
2022-08-15 16:08:34 +01:00
cpq
d76f86f7db
Get rid of mg_*asprintf
2022-08-13 15:37:55 +01:00
Sergey Lyubka
f2009ebd62
Move mg_*printf* decls in fmt.h
2022-07-28 10:18:17 +01:00
Sergey Lyubka
54f75889fa
Using mg_snprintf() everywhere
2022-02-10 17:11:03 +00:00
Sergey Lyubka
f64c86d23f
Use mg_snprintf()
2022-02-10 11:56:55 +00:00
Sergey Lyubka
8cd4699dbc
Rename FS API functions to avoid conflicts
2022-02-08 13:36:04 +00:00
Sergey Lyubka
56a7438114
Add fs arg to mg_file* and mg_http_upload API
2022-01-18 17:11:02 +00:00
Sergey Lyubka
02b3b780bb
Add missing fs.c
2022-01-17 14:44:59 +00:00
Sergey Lyubka
9346122c29
Add FS API layer
2021-07-28 21:11:07 +01:00
Sergey Lyubka
55d102e450
Enable mg_fopen_packed in newlib
2021-07-27 09:50:11 +01:00
Sergey Lyubka
2d585474c1
Add riscv target, enhance arm target
2021-07-26 11:00:37 +01:00
Sergey Lyubka
53ee984eb7
Fix mg_prefix test
2021-07-26 09:26:52 +01:00
Sergey Lyubka
bdb747f9de
Fix mg_prefix test
2021-07-26 09:15:17 +01:00
Sergey Lyubka
299075c930
Add test for fopen_packed()
2021-07-26 09:05:34 +01:00
Sergey Lyubka
d6dbf831f7
Remove mg_stat
2021-07-24 10:35:48 +01:00
Sergey Lyubka
2a2c17a232
Remove MG_ENABLE_STDIO and cleanup
2021-07-24 03:44:00 +01:00