summaryrefslogtreecommitdiff
path: root/src/xine-utils/xineutils.h
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 17:12:05 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-04-14 17:12:05 +0200
commitb10d5cccee5d2945b1924a732a9b7d9d79d91b0b (patch)
tree51f0349cbb1081af758eee5455f094d0b7c171d5 /src/xine-utils/xineutils.h
parent9c7b147a1878bd2c9290bb3377f41bc4a27ddccd (diff)
downloadxine-lib-b10d5cccee5d2945b1924a732a9b7d9d79d91b0b.tar.gz
xine-lib-b10d5cccee5d2945b1924a732a9b7d9d79d91b0b.tar.bz2
Add a xine_xcalloc function to wrap around calloc(), to improve security from now on.
Diffstat (limited to 'src/xine-utils/xineutils.h')
-rw-r--r--src/xine-utils/xineutils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h
index 03c5f689a..20c3cb2dc 100644
--- a/src/xine-utils/xineutils.h
+++ b/src/xine-utils/xineutils.h
@@ -630,6 +630,12 @@ void *xine_xmalloc(size_t size) XINE_PROTECTED;
void *xine_xmalloc(size_t size) __attribute__ ((__malloc__)) XINE_PROTECTED;
#endif
+#if !defined(__GNUC__) || __GNUC__ < 3
+void *xine_xcalloc(size_t nmemb, size_t size) XINE_PROTECTED;
+#else
+void *xine_xcalloc(size_t nmemb, size_t size) __attribute__ ((__malloc__)) XINE_PROTECTED;
+#endif
+
/*
* Same as above, but memory is aligned to 'alignement'.
* **base is used to return pointer to un-aligned memory, use