Skip to content
Snippets Groups Projects
Commit 5f318d80 authored by Torsten Merz's avatar Torsten Merz
Browse files

added sig_atomic_t type size check

parent 0af5c61d
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,8 @@
#include <stdlib.h>
#include <sys/io.h>
#include <sys/resource.h>
#include <limits.h>
#include <signal.h>
// UDP socket related
#include <netdb.h>
......@@ -375,6 +377,14 @@ int nrtSmi(char *esmFile, char *tssFile, char *tdeFile, char *cfgFile) {
printf("[nrtSmi] data type mismatch\n");
goto exit;
}
/* check size of sig_atomic_t type */
if (sizeof(sig_atomic_t)*CHAR_BIT<4*8)
{
error=4;
printf("[nrtSmi] atomic type size too small\n");
goto exit;
}
printf("[nrtSmi] allocating system shared memory\n");
if (initShm(&shm_fd,sizeof(shm_struct),(void *) &shm,SHM_FILE)!=0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment