mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-02 19:29:30 +00:00
Merge pull request #710 from nvt/coffee-filename-fix
Coffee: Copy the correct number of bytes in filenames
This commit is contained in:
commit
40d33657a3
@ -651,7 +651,7 @@ reserve(const char *name, coffee_page_t pages,
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(&hdr, 0, sizeof(hdr));
|
memset(&hdr, 0, sizeof(hdr));
|
||||||
memcpy(hdr.name, name, sizeof(hdr.name) - 1);
|
strncpy(hdr.name, name, sizeof(hdr.name) - 1);
|
||||||
hdr.max_pages = pages;
|
hdr.max_pages = pages;
|
||||||
hdr.flags = HDR_FLAG_ALLOCATED | flags;
|
hdr.flags = HDR_FLAG_ALLOCATED | flags;
|
||||||
write_header(&hdr, page);
|
write_header(&hdr, page);
|
||||||
|
Loading…
Reference in New Issue
Block a user