Commit Graph

9 Commits

Author SHA1 Message Date
Marc-André Lureau
fc80f096e4 common: spice_memdup could accept NULL
(this patch is not to solve a crash fix, but to align with glib API)
2011-05-03 16:49:56 +02:00
Christophe Fergeau
78c1465ed3 add #include <config.h> to all source files
When using config.h, it must be the very first include in all source
files since it contains #define that may change the compilation process
(eg libc structure layout changes when it's used to enable large file
support on 32 bit x86 archs). This commit adds it at the beginning
of all .c and .cpp files
2011-05-03 14:44:10 +02:00
Marc-André Lureau
2bbb4fca0c common: add SpiceBuffer - based on qemu-vnc Buffer
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Alexander Larsson
925f6387c8 Fix sign warnings from win32 compiler 2010-07-08 15:44:39 +02:00
Alexander Larsson
a415c55765 Add spice_chunks_* helpers 2010-07-07 23:10:47 +02:00
Alexander Larsson
1d1792c217 Add spice_strnlen 2010-06-17 11:21:03 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Alexander Larsson
ce0d8a094c Add spice_strndup
Also, make str(n)dup handle NULL correctly
2010-03-24 17:02:20 +01:00
Alexander Larsson
440ac41cf1 New memory allocators that exit on OOM and handle multiplication overflow
Every place that does a regular malloc/calloc and aborts on failure
should use spice_malloc/spice_mallo0 instead, which is leaner and cleaner.

Allocations of dynamically sized arrays can use g_malloc_n or g_new etc
which correctly handle multiplication overflow if some of the arguments
are not trusted.
2010-03-11 12:13:59 +01:00