[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace] ksplash/ksplashx: Fix possible uninitialized
From: Alberto Mattea <alberto () mattea ! info>
Date: 2011-11-06 16:52:26
Message-ID: 20111106165226.87983A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 464c4eb2067eff3a6e976e5f2da82bca3a1a5240 by Alberto Mattea.
Committed on 06/11/2011 at 17:47.
Pushed by mattea into branch 'master'.
Fix possible uninitialized variable use in ksplashx multi-screen code.
Newer X servers seem to set ":0" instead of ":0.0" a the default DISPLAY value, and \
we didn't handle this case properly. I didn't open a review request since it's an \
obvious one-liner, my apologies if I should have done.
M +1 -1 ksplash/ksplashx/main.cpp
http://commits.kde.org/kde-workspace/464c4eb2067eff3a6e976e5f2da82bca3a1a5240
diff --git a/ksplash/ksplashx/main.cpp b/ksplash/ksplashx/main.cpp
index 3239cd3..dcbf283 100644
--- a/ksplash/ksplashx/main.cpp
+++ b/ksplash/ksplashx/main.cpp
@@ -90,7 +90,7 @@ int main( int argc, char* argv[] )
screen_number = DefaultScreen(dpy);
char* display_name;
display_name = XDisplayString(dpy);
- int breakpos;
+ int breakpos = strlen(display_name);
for (int i = strlen(display_name) - 1; i >= 0; i--)
{
if (display_name[i] == '.')
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic