summaryrefslogtreecommitdiff
path: root/src/cairo-base85-stream.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix undefined left-shiftsHeiko Lewin2021-03-311-1/+1
|
* Use _cairo_malloc instead of mallocAdrian Johnson2018-05-071-1/+1
| | | | | | | | | | _cairo_malloc(0) always returns NULL, but has not been used consistently. This patch replaces many calls to malloc() with _cairo_malloc(). Fixes: fdo# 101547 CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | I updated the Free Software Foundation address using the following script. for i in $(git grep Temple | cut -d: -f1 ) do sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i" done Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
* Move _cairo_error() to a standalone headerChris Wilson2010-01-221-0/+1
| | | | | A pending commit will want to include some utility code from cairo and so we need to extricate the error handling from the PLT symbol hiding.
* Add xml surfaceChris Wilson2009-08-291-3/+0
| | | | | | | A very simple surface that produces a hierarchical DAG in a simple XML format. It is intended to be used whilst debugging, for example with the automatic regression finding tools of cairo-sphinx, and with test suites that just want to verify that their code made a particular Cairo call.
* Mark allocation failures as unlikely.Chris Wilson2008-11-291-1/+1
| | | | | Use the gcc likelihood annotation to indicate that allocation failures are extremely unlikely.
* Add CairoScript backend.Chris Wilson2008-11-131-0/+1
| | | | | | | | | | A new meta-surface backend for serialising drawing operations to a CairoScript file. The principal use (as currently envisaged) is to provide a round-trip testing mechanism for CairoScript - i.e. we can generate script files for every test in the suite and check that we can replay them with perfect fidelity. (Obviously this does not provide complete coverage of CairoScript's syntax, but should give reasonable coverage over the operators.)
* Fix now-detected doc formatting issuesBehdad Esfahbod2008-06-011-1/+2
|
* [doc] Make sure all function names in docs are followed by ()Behdad Esfahbod2008-01-281-2/+1
|
* [cairo-output-stream] Introduce _cairo_output_stream_create_in_error()Chris Wilson2008-01-161-0/+3
| | | | | | | Use a utility function to wrap an incoming error status into a new error stream. As a side-effect, all error streams must be destroyed as in the general case the caller can not distinguish between a static error object and one allocated to hold an unusual error status.
* [cairo-error] Clean up all the warnings and missing _cairo_error() calls.Chris Wilson2007-10-041-1/+1
| | | | | | | | | | | Every time we assign or return a hard-coded error status wrap that value with a call to _cairo_error(). So the idiom becomes: status = _cairo_error (CAIRO_STATUS_NO_MEMORY); or return _cairo_error (CAIRO_STATUS_INVALID_DASH); This ensures that a breakpoint placed on _cairo_error() will trigger immediately cairo detects the error.
* [malloc/error] Add call to _cairo_error() after a failed malloc.Chris Wilson2007-10-041-1/+3
| | | | | Blitz all allocations to ensure that they raise a _cairo_error(CAIRO_STATUS_NO_MEMORY) on failure.
* Make sure all nil objects start with _cairo_Behdad Esfahbod2007-04-031-1/+1
| | | | | | | | | Previously, the convention was that static ones started with cairo_, but renamed to start with _cairo_ when they were needed from other files and became cairo_private instead of static... This is error prune indeed, and two symbols were already violating. Now all nil objects start with _cairo_.
* Convert the word wrap stream, the base85 stream and the ps string stream.Kristian Høgsberg2006-06-121-15/+12
|
* Make cairo_output_stream_t an embeddable type.Kristian Høgsberg2006-06-121-0/+1
| | | | | | | | | | | | | | | | | | Most internal cairo types are transparent within cairo and have init and fini functions to intialize and finialize them in place. This way they can be easily be embedded in other structs or derived from. Initially, the cairo_output_stream_t type was proposed as a publically visible type and thus kept opaque. However, now it's only used internally and derived from in a number of places so let's make it an embeddable type for consistency and ease of use. The patch keeps _cairo_output_stream_create() and _cairo_output_stream_close() around for (internal) backwards compatibility by deriving a cairo_output_stream_with_closure_t stream type. The patch also moves all cairo_output_stream_t functions out of cairoint.h and into new file cairo-output-stream-private.h, thus chipping away at the monolithic cairoint.h.
* Remove initial, final, and duplicate blank lines.Carl Worth2006-06-061-1/+0
| | | | | | This patch was produced by running git-stripspace on all *.[ch] files within cairo. Note that this script would have also created all the changes from the previous commits to remove trailing whitespace.
* Remove trailing whitespace from lines that look like comments.Carl Worth2006-06-061-1/+1
| | | | | | | | | | This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//' run on all *.[ch] files within cairo, (though I manually excluded src/cairo-atsui-font.c which has a code line that appears as a comment to this script).
* Remove extraneous whitespace from "blank" lines.Carl Worth2006-06-061-1/+1
| | | | | | | | This patch was produced with the following (GNU) sed script: sed -i -r -e 's/^[ \t]+$//' run on all *.[ch] files within cairo.
* Rename write_data to write_func in cairo_output_stream_t.Carl Worth2006-04-071-4/+4
|
* Break PostScript image data into chunks that each fit into a string.Carl Worth2006-04-041-21/+9
| | | | | | | | | This solves the problem with the previous commit that made strings longer than the "standard" 65k implementation limit for strings. It's achieved by removing the line-wrapping from the base85 stream and instead adding a new string-array stream between the base85 stream and the output stream (the string-array stream does the line wrapping and enforces the 65k characters per string limit).
* Implement proper cairo-style error-handling for cairo_output_stream_t.Carl Worth2006-04-041-29/+11
| | | | | | | | | | | The cairo_output_stream_t object already had an internal status value, but it was annoyingly returning status values from various functions. It also was missing proper shutdown-on-error as well as nil-create semantics. This fixes those shortcomings and adjusts all callers for the new semantics, (leading to simpler and more correct calling code---particularly in the case of cairo-base85-stream.c).
* Implement cairo-base85-stream as a filtering output stream not just a write ↵Carl Worth2006-04-031-40/+102
| | | | | | | | | function. Now _cairo_output_stream_create accepts a new close callback, (which the base85 stream uses to write its trailer). This eliminates the former kludge used to fclose the stdio output streams, and required a bit of touchup to the pdf, ps, and svg-surface usage of streams.
* Move base85 code out of cairo-output-stream.c into new cairo-base85-stream.cCarl Worth2006-04-031-0/+98