diff options
author | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:19:56 -0300 |
---|---|---|
committer | Lucas de Castro Borges <lucas@gnuabordo.com.br> | 2024-04-22 19:19:56 -0300 |
commit | fbf360db614483cc1655e47be4744b5bd00d54f5 (patch) | |
tree | 15cf74264e91ede73e5d4a0e18a3d32091ceddc2 /hardinfo2/x_util.c | |
parent | 647775860805ea26a377c10d1490686a6f7a3434 (diff) | |
parent | 0574020490ffae5686b0c75d7753bfbcf2286114 (diff) |
Update upstream source from tag 'upstream/2.0.17pre'
Update to upstream version '2.0.17pre'
with Debian dir 5d26fb98f3078817a456822b48c33e4ffac5c49e
Diffstat (limited to 'hardinfo2/x_util.c')
-rw-r--r-- | hardinfo2/x_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hardinfo2/x_util.c b/hardinfo2/x_util.c index 2a7febb4..95e3274d 100644 --- a/hardinfo2/x_util.c +++ b/hardinfo2/x_util.c @@ -156,7 +156,7 @@ gboolean fill_xrr_info(xrr_info *xrr) { x_screen ts; x_output to; - char output_id[128]; + char output_id[64]; char status[128]; char alist[512]; @@ -195,7 +195,7 @@ gboolean fill_xrr_info(xrr_info *xrr) { /* looking for: * <output_id> (connected|disconnected|unknown connection) (primary|?) <%dx%d+%d+%d> (attribute_list) mm x mm */ - ec = sscanf(p, "%127s %127[^(](%511[^)]", output_id, status, alist); + ec = sscanf(p, "%63s %127[^(](%511[^)]", output_id, status, alist); if (ec == 3) { int is_output = 0, found_rect = 0, n = 0; gchar **ot = g_strsplit(status, " ", 0); @@ -228,7 +228,7 @@ gboolean fill_xrr_info(xrr_info *xrr) { } g_strfreev(ot); if (is_output) { - strncpy(to.name, output_id, 63); + strncpy(to.name, output_id, 64); xrr->output_count++; if (xrr->outputs == NULL) xrr->outputs = malloc(xrr->output_count * sizeof(x_output)); |