projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: agent events HT should be destroyed from the cleanup thread
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
syscall.c
diff --git
a/src/bin/lttng-sessiond/syscall.c
b/src/bin/lttng-sessiond/syscall.c
index ee7578051e2a12d3322cb6e3d9fd4ae2946da1a7..b4f2e1eca92f2fb726aa774f8bc94f384bc2f000 100644
(file)
--- a/
src/bin/lttng-sessiond/syscall.c
+++ b/
src/bin/lttng-sessiond/syscall.c
@@
-35,7
+35,7
@@
static size_t syscall_table_nb_entry;
* Populate the system call table using the kernel tracer.
*
* Return 0 on success and the syscall table is allocated. On error, a negative
* Populate the system call table using the kernel tracer.
*
* Return 0 on success and the syscall table is allocated. On error, a negative
- * value is returned
and the syscall table is set to NULL
.
+ * value is returned.
*/
int syscall_init_table(void)
{
*/
int syscall_init_table(void)
{
@@
-82,6
+82,14
@@
int syscall_init_table(void)
/* Double memory size. */
new_nbmem = max(index, nbmem << 1);
/* Double memory size. */
new_nbmem = max(index, nbmem << 1);
+ if (new_nbmem < nbmem) {
+ /* Overflow, stop everything, something went really wrong. */
+ ERR("Syscall listing memory size overflow. Stopping");
+ free(syscall_table);
+ syscall_table = NULL;
+ ret = -EINVAL;
+ goto error;
+ }
DBG("Reallocating syscall table from %zu to %zu entries", nbmem,
new_nbmem);
DBG("Reallocating syscall table from %zu to %zu entries", nbmem,
new_nbmem);
This page took
0.026728 seconds
and
4
git commands to generate.