fixed short title bug in wmiibar reported by bogon

This commit is contained in:
garbeam 2006-01-04 17:28:31 +02:00
parent 7d76910f15
commit ee3d76b744
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ alloc_client(Window w)
c->win = w;
XGetWMName(dpy, c->win, &name);
if(name.value) {
strncpy(c->name, (char *)name.value, 256);
cext_strlcpy(c->name, (char *)name.value, sizeof(c->name));
free(name.value);
}
return c;
@ -163,7 +163,7 @@ handle_client_property(Client * c, XPropertyEvent * e)
case XA_WM_NAME:
XGetWMName(dpy, c->win, &name);
if(name.value) {
strncpy(c->name, (char*) name.value, 256);
cext_strlcpy(c->name, (char*) name.value, sizeof(c->name));
free(name.value);
}
if(c->frame)

View File

@ -387,7 +387,7 @@ handle_before_read_frames(IXPServer * s, File * file, Area * a)
free(file->content);
if(f->sel && f->sel->name) {
file->content = cext_estrdup(f->sel->name);
file->size = strlen(buf);
file->size = strlen(f->sel->name);
}
else {
file->content = nil;