Since the operands are int, SS_UINT32(unsigned int) and long type, it is
required to cast them into a big enough type before adding them.
(Thier value are all non-negative values)
To resolve this issue, operands are casted to uint64_t, which is big
enough to store the value of the variables and the result of the
arithmetic operation.
Change-Id: Iecf8ffa3be11984ce6fdc3d850f9b9c9f74c7186
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
#include <string.h>
#include <strings.h>
#include <sys/wait.h>
+#include <stdint.h>
#include <ftw.h>
#include <sys/xattr.h>
return E_SS_READ_ERROR;
}
- if ((unsigned int)ret != dwSize && (((unsigned long)ret + (unsigned long)dwPosition) != (unsigned long)SS_GetFileSize(wHandle)))
+ if ((unsigned int)ret != dwSize && (((uint64_t)ret + (uint64_t)dwPosition) != (uint64_t)SS_GetFileSize(wHandle)))
return E_SS_READ_ERROR;
pbBuffer[ret] = '\0';