Signed-off-by: Jan Friesse <jfrie...@redhat.com> --- lib/coroipcc.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/coroipcc.c b/lib/coroipcc.c index 1adce0e..862047d 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -311,6 +311,10 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes) } page_size = sysconf(_SC_PAGESIZE); + if (page_size < 0) { + goto error_close_unlink; + } + buffer = malloc (page_size); if (buffer == NULL) { goto error_close_unlink; @@ -417,6 +421,10 @@ memory_map (char *path, const char *file, void **buf, size_t bytes) goto error_close_unlink; } page_size = sysconf(_SC_PAGESIZE); + if (page_size < 0) { + goto error_close_unlink; + } + buffer = malloc (page_size); if (buffer == NULL) { goto error_close_unlink; -- 1.7.1 _______________________________________________ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais