[sysprof] libsysprof: check for enough symbols to dereference



commit 716b913347eb04bf3eca80fb776fe0ac18614dd7
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 28 20:14:57 2019 -0700

    libsysprof: check for enough symbols to dereference

 src/libsysprof/sysprof-kernel-symbol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libsysprof/sysprof-kernel-symbol.c b/src/libsysprof/sysprof-kernel-symbol.c
index cdd14fb..171f6bc 100644
--- a/src/libsysprof/sysprof-kernel-symbol.c
+++ b/src/libsysprof/sysprof-kernel-symbol.c
@@ -222,7 +222,7 @@ _sysprof_kernel_symbols_lookup (const SysprofKernelSymbols *self,
 
   g_assert (self != NULL);
 
-  if (self->len == 0)
+  if (self->len < 2)
     return NULL;
 
   /* Short circuit if this is out of range */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]