diff options
| author | Ian Douglas Scott <idscott@system76.com> | 2022-07-14 08:36:21 -0700 |
|---|---|---|
| committer | Ian Douglas Scott <idscott@system76.com> | 2022-07-14 08:38:49 -0700 |
| commit | 971f8e4ace3d4080340f43574043c31f46db312f (patch) | |
| tree | 4d543a3ac6c83d899ec1c3d6878b0c5f39fb20e3 /src | |
| parent | Do not allow nullable arrays, which were not correctly implemented (diff) | |
| download | wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar.gz wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar.bz2 wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar.lz wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar.xz wayland-971f8e4ace3d4080340f43574043c31f46db312f.tar.zst wayland-971f8e4ace3d4080340f43574043c31f46db312f.zip | |
Do not allow nullable `new_id`
The usefulness of this is limited, and `libwayland-client` doesn't
provide a way to pass a null `new_id` since the id is generated by the
library and given to the caller as the return value.
Signed-off-by: Ian Douglas Scott <idscott@system76.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/connection.c | 4 | ||||
| -rw-r--r-- | src/scanner.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c index 594f2e9..ceaeac1 100644 --- a/src/connection.c +++ b/src/connection.c @@ -630,7 +630,7 @@ wl_closure_marshal(struct wl_object *sender, uint32_t opcode, break; case 'n': object = args[i].o; - if (!arg.nullable && object == NULL) + if (object == NULL) goto err_null; closure->args[i].n = object ? object->id : 0; @@ -799,7 +799,7 @@ wl_connection_demarshal(struct wl_connection *connection, id = *p++; closure->args[i].n = id; - if (id == 0 && !arg.nullable) { + if (id == 0) { wl_log("NULL new ID received on non-nullable " "type, message %s(%s)\n", message->name, message->signature); diff --git a/src/scanner.c b/src/scanner.c index 551d817..da8adea 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -414,7 +414,6 @@ is_nullable_type(struct arg *arg) /* Strings and objects are possibly nullable */ case STRING: case OBJECT: - case NEW_ID: return true; default: return false; |
