Commit graph

3 commits

Author SHA1 Message Date
Adrian Johnson
82aa3fb80e Fix bug in strndup implementation
The strlen() could go past the n bytes and into a memory address we
don't have read access to.
2023-01-03 15:27:05 +10:30
Andrea Canciani
6ad63946d4 cairo-missing: Fix build
The cairo-missing code contains multiple typos and uses
_cairo_*alloc*() functions without including cairo-malloc-private.h
2011-09-04 16:23:37 -07:00
Andrea Canciani
6d6bfbd641 Introduce the cairo-missing library
The cairo-missing library provides the functions which are needed in
order to correctly compile cairo (or its utilities) and which were not
found during configuration.

Fixes the build on MacOS X Lion, which failed because of collisons
between the cairo internal getline and strndup and those in libc:

cairo-analyse-trace.c:282: error: static declaration of ‘getline’ follows non-static declaration
/usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here
cairo-analyse-trace.c:307: error: static declaration of ‘strndup’ follows non-static declaration
...
2011-09-02 12:27:13 +02:00