shared/calendarspec: do not allocate a big string on stack
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Feb 2019 21:35:46 +0000 (22:35 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Feb 2019 22:31:07 +0000 (23:31 +0100)
commitea53cfd195f037a65b68a9749e310ab70e254805
tree1fca48857d87de81c46aea5af069d2a102d8e47e
parent7321d504e61eb14cb951a0e493d327130499f9d3
shared/calendarspec: do not allocate a big string on stack

The string can be as long as a logical line in a unit file — so no unlimited,
but quite big. Let's use a normal heap allocation when making a copy.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13125
src/shared/calendarspec.c
test/fuzz/fuzz-unit-file/oss-fuzz-13125 [new file with mode: 0644]