aboutsummaryrefslogtreecommitdiffstats
path: root/src/ical.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix up strncat() usageLukas Fleischer2012-02-181-2/+1
| | | | | | | | | | | | | | | The last argument to strncat() should not be the total buffer length; it should be the space remaining: The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1. The initial byte of s2 overwrites the null byte at the end of s1. A terminating null byte is always appended to the result. This patch fixes a couple of potential buffer overflow vulnerabilities. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Don't chomp on error in ical_readline_init()Lukas Fleischer2012-02-181-4/+6
| | | | | | | Skip the newline check if fgets() returns a NULL string. Fixes another warning seen with "-Wunused-result". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Split note file generation into separate functionLukas Fleischer2012-01-171-12/+3
| | | | | | | We currently use this in one place only but might reuse this a couple of times later (when migrating to libical). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Break out different import/export formatsLukas Fleischer2012-01-071-0/+1263
Extract iCal and pcal import/export routines into separate files. This reduces complexity of the super huge "io.c" source file and makes it easier to follow changes that affect the iCal and pcal routines only (commits affecting both formats are very uncommon). Before: $ wc -l src/io.c 2938 src/io.c After: $ wc -l src/{io,ical,pcal}.c 1445 src/io.c 1263 src/ical.c 317 src/pcal.c 3025 total Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>