Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158569 Details for
Bug 246796
Stack overflow detected when running powertop with de_DE.UTF-8 locale
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
uses strncpy instead of strcpy for writing into status_bar_slots
powertop-1.7-strcpy.patch (text/plain), 2.56 KB, created by
Till Maas
on 2007-07-05 00:54:17 UTC
(
hide
)
Description:
uses strncpy instead of strcpy for writing into status_bar_slots
Filename:
MIME Type:
Creator:
Till Maas
Created:
2007-07-05 00:54:17 UTC
Size:
2.56 KB
patch
obsolete
>diff -u powertop-1.7.orig/display.c powertop-1.7/display.c >--- powertop-1.7.orig/display.c 2007-06-18 03:16:33.000000000 +0200 >+++ powertop-1.7/display.c 2007-07-05 02:43:51.000000000 +0200 >@@ -44,7 +44,7 @@ > static WINDOW *status_bar_window; > > >-char status_bar_slots[10][40]; >+char status_bar_slots[STATUS_BAR_NR_SLOTS][STATUS_BAR_SLOTSIZE + 1]; > > static void cleanup_curses(void) { > endwin(); >@@ -104,8 +104,8 @@ > suggestion_window = subwin(stdscr, 3, maxx, maxy-4, 0); > status_bar_window = subwin(stdscr, 1, maxx, maxy-1, 0); > >- strcpy(status_bar_slots[0], _(" Q - Quit ")); >- strcpy(status_bar_slots[1], _(" R - Refresh ")); >+ strncpy(status_bar_slots[0], _(" Q - Quit "), STATUS_BAR_SLOTSIZE); >+ strncpy(status_bar_slots[1], _(" R - Refresh "), STATUS_BAR_SLOTSIZE); > > werase(stdscr); > refresh(); >@@ -148,7 +148,7 @@ > werase(status_bar_window); > > x = 0; >- for (i=0; i<10; i++) { >+ for (i=0; i < STATUS_BAR_NR_SLOTS; i++) { > if (strlen(status_bar_slots[i])==0) > continue; > wattron(status_bar_window, A_REVERSE); >Gemeinsame Unterverzeichnisse: powertop-1.7.orig/po und powertop-1.7/po. >diff -u powertop-1.7.orig/powertop.h powertop-1.7/powertop.h >--- powertop-1.7.orig/powertop.h 2007-06-17 08:21:37.000000000 +0200 >+++ powertop-1.7/powertop.h 2007-07-05 02:39:53.000000000 +0200 >@@ -64,7 +64,10 @@ > extern int topcstate; > extern int topfreq; > >-extern char status_bar_slots[10][40]; >+#define STATUS_BAR_NR_SLOTS 10 >+#define STATUS_BAR_SLOTSIZE 40 >+char status_bar_slots[STATUS_BAR_NR_SLOTS][STATUS_BAR_SLOTSIZE + 1]; >+ > extern char suggestion_key; > extern suggestion_func *suggestion_activate; > >diff -u powertop-1.7.orig/suggestions.c powertop-1.7/suggestions.c >--- powertop-1.7.orig/suggestions.c 2007-06-08 07:33:13.000000000 +0200 >+++ powertop-1.7/suggestions.c 2007-07-05 02:42:59.000000000 +0200 >@@ -70,7 +70,7 @@ > ptr = next; > } > suggestions = NULL; >- strcpy(status_bar_slots[9],""); >+ strncpy(status_bar_slots[9], "", STATUS_BAR_SLOTSIZE); > suggestion_key = 255; > suggestion_activate = NULL; > total_weight = 0; >@@ -103,7 +103,7 @@ > int value, running = 0; > struct suggestion *ptr; > >- strcpy(status_bar_slots[9],""); >+ strncpy(status_bar_slots[9], "", STATUS_BAR_SLOTSIZE); > suggestion_key = 255; > suggestion_activate = NULL; > >@@ -119,7 +119,7 @@ > running += ptr->weight; > if (running > value) { > if (ptr->keystring) >- strcpy(status_bar_slots[9],ptr->keystring); >+ strncpy(status_bar_slots[9], ptr->keystring, STATUS_BAR_SLOTSIZE); > suggestion_key = ptr->key; > suggestion_activate = ptr->func; > show_suggestion(ptr->string);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246796
:
158557
| 158569