diff options
author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-26 17:55:09 +0200 |
---|---|---|
committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-26 18:16:29 +0200 |
commit | d0d480b91acc049db3effaf98d0e43f5de908446 (patch) | |
tree | cdb142f4044a506ca193e145393d620b618ebb26 /backend/drm | |
parent | 4d7f1aeb734cd2c9d75a59a0793941d5bb012749 (diff) |
backend/drm: fix crash with null serial
backend/drm: use serial_str instead
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/drm/util.c b/backend/drm/util.c index 8588fa86..eb419092 100644 --- a/backend/drm/util.c +++ b/backend/drm/util.c @@ -103,7 +103,8 @@ void parse_edid(struct wlr_drm_connector *conn, size_t len, const uint8_t *data) // Monitor serial numbers are terminated by newline if they're too // short - char *nl = strchr(output->serial, '\n'); + char* nl = strchr(serial_str, '\n'); + if (nl) { *nl = '\0'; } |