summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <none@none>2012-07-14 01:16:51 +0200
committerportix <none@none>2012-07-14 01:16:51 +0200
commit01841ca8a4f7b29e392153b86c5de3f937afe00e (patch)
treec78434e4114d6e5d702aaf7fb1824dac25b6a2c2 /src
parentb786cca91f3d4a481cd49ae23dd27d28d570e472 (diff)
downloaddwb-01841ca8a4f7b29e392153b86c5de3f937afe00e.zip
Fixing possible segfault in local_show_directory
Diffstat (limited to 'src')
-rw-r--r--src/local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/local.c b/src/local.c
index 5910c261..e5b184e7 100644
--- a/src/local.c
+++ b/src/local.c
@@ -205,7 +205,7 @@ local_show_directory(GList *gl, const char *path, gboolean add_to_history) {
struct passwd *pwd = getpwuid(st.st_uid);
char *user = pwd && pwd->pw_name ? pwd->pw_name : "";
struct group *grp = getgrgid(st.st_gid);
- char *group = pwd && grp->gr_name ? grp->gr_name : "";
+ char *group = grp && grp->gr_name ? grp->gr_name : "";
if (*class == 0)
strcpy(class, "dwb_local_regular");