diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-21 11:27:44 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-21 11:58:09 -0700 |
commit | fba7bf352678db2938f5a7b173d2a8823595ef3b (patch) | |
tree | 5904d84f93ecf1c6249f5f0e45c111d71da08709 | |
parent | 506cebe7bffb19f9310565b82231a08cc8e77ece (diff) |
Found by gcc 14.1:
Xv.c: In function ‘XvQueryAdaptors’:
Xv.c:222:31: warning: dereference of NULL ‘<unknown>’ [CWE-476]
[-Wanalyzer-null-dereference]
222 | pa->type = (char) u.pa->type;
| ~~~~^~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxv/-/merge_requests/7>
-rw-r--r-- | src/Xv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -192,6 +192,10 @@ XvQueryAdaptors( } _XRead(dpy, buffer, (long) size); } + else if (rep.num_adaptors != 0) { + status = XvBadReply; + goto out; + } /* GET INPUT ADAPTORS */ |