Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 63036 Details for
Bug 60581
xclip can't handle input of >4096 bytes.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Doesn't seg fault, makes me smile.
xclib.segv.patch (text/plain), 1.34 KB, created by
Rich Paul
on 2005-07-09 15:17:42 UTC
(
hide
)
Description:
Doesn't seg fault, makes me smile.
Filename:
MIME Type:
Creator:
Rich Paul
Created:
2005-07-09 15:17:42 UTC
Size:
1.34 KB
patch
obsolete
>--- xclib.c.orig 2005-07-09 18:03:59.000000000 -0400 >+++ xclib.c 2005-07-09 18:04:41.000000000 -0400 >@@ -107,9 +107,6 @@ > unsigned char *buffer; > unsigned long pty_size, pty_items; > >- /* local buffer of text to return */ >- unsigned char *ltxt; >- > pty = XInternAtom(dpy, "XCLIP_OUT", False); > > switch (*context) >@@ -197,12 +194,12 @@ > XDeleteProperty(dpy, win, pty); > > /* copy the buffer to the pointer for returned data */ >- ltxt = (unsigned char *)xcmalloc(pty_items); >- memcpy(ltxt, buffer, pty_items); >+ (*txt) = (unsigned char *)xcmalloc(pty_items); >+ memcpy((*txt), buffer, pty_items); > > /* set the length of the returned data */ > *len = pty_items; >- *txt = ltxt; >+ *txt = (*txt); > > /* free the buffer */ > XFree(buffer); >@@ -289,21 +286,21 @@ > if (*len == 0) > { > *len = pty_items; >- ltxt = (unsigned char *)xcmalloc(*len); >+ (*txt) = (unsigned char *)xcmalloc(*len); > } else > { > *len += pty_items; >- ltxt = (unsigned char *)xcrealloc(ltxt, *len); >+ (*txt) = (unsigned char *)xcrealloc((*txt), *len); > } > >- /* add data to ltxt */ >+ /* add data to (*txt) */ > memcpy( >- <xt[*len - pty_items], >+ &(*txt)[*len - pty_items], > buffer, > pty_items > ); > >- *txt = ltxt; >+ *txt = (*txt); > > /* delete property to get the next item */ > XDeleteProperty(dpy, win, pty);
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 60581
: 63036