diff --git a/services/modules/seccomp/scripts/generate_code_from_policy.py b/services/modules/seccomp/scripts/generate_code_from_policy.py index 78fefb3b65ed7c3abc2f348dc12048c782a55b15..faf751b357f599b107db02345d0d35b4d39aa187 100755 --- a/services/modules/seccomp/scripts/generate_code_from_policy.py +++ b/services/modules/seccomp/scripts/generate_code_from_policy.py @@ -48,6 +48,7 @@ mode_str = { 'ONLY_CHECK_ARGS': 1 } + def is_hex_digit(s): try: int(s, 16) diff --git a/services/param/linux/param_message.c b/services/param/linux/param_message.c index 6d8639cf3a4f349a3d01d858eb3c649234f484a3..61f5c2ceeefc4ae58b9dbea8dadd4459e266fc32 100644 --- a/services/param/linux/param_message.c +++ b/services/param/linux/param_message.c @@ -33,7 +33,7 @@ int ConnectServer(int fd, const char *servername) addr.sun_family = AF_UNIX; ret = sprintf_s(addr.sun_path, sizeof(addr.sun_path) - 1, "%s", servername); PARAM_CHECK(ret > EOK, return -1, "Failed to sprintf_s server address"); - int len = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path); + size_t len = offsetof(struct sockaddr_un, sun_path) + strlen(addr.sun_path); ret = connect(fd, (struct sockaddr *)&addr, len); PARAM_CHECK(ret != -1, return -1, "Failed to connect server %s %d", servername, errno); PARAM_LOGV("ConnectServer %s success", servername);