After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 615618 - MAXPATHLEN used unconditionally
MAXPATHLEN used unconditionally
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-04-13 07:45 UTC by Emilio Pozuelo Monfort
Modified: 2010-09-16 17:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use dynamic allocation to avoid MAXPATHLEN (859 bytes, patch)
2010-04-13 07:45 UTC, Emilio Pozuelo Monfort
none Details | Review
Use dynamic allocation to avoid MAXPATHLEN, take 2 (2.47 KB, patch)
2010-04-13 08:00 UTC, Emilio Pozuelo Monfort
none Details | Review
Another fix for this problem. (2.83 KB, patch)
2010-09-11 21:04 UTC, Stef Walter
none Details | Review

Description Emilio Pozuelo Monfort 2010-04-13 07:45:12 UTC
This is similar to https://bugzilla.gnome.org/show_bug.cgi?id=604493

MAXPATHLEN has been reintroduced. This patch makes use of dynamic allocation rather than fixed MAXPATHLEN size buffers, fixing the build on GNU/Hurd again.

Would be nice to get it in 2.30.1
Comment 1 Emilio Pozuelo Monfort 2010-04-13 07:45:56 UTC
Created attachment 158575 [details] [review]
Use dynamic allocation to avoid MAXPATHLEN
Comment 2 Emilio Pozuelo Monfort 2010-04-13 08:00:58 UTC
Created attachment 158576 [details] [review]
Use dynamic allocation to avoid MAXPATHLEN, take 2

Meh, this one also frees the buffer before returning from the function :-)

The MAXPATHLEN check is not needed since lstat should just return -1 with errno set to ENAMETOOLONG, so we don't need to manually check it.
Comment 3 Emilio Pozuelo Monfort 2010-04-26 09:41:12 UTC
Ping?
Comment 4 Stef Walter 2010-09-11 21:04:32 UTC
Created attachment 170042 [details] [review]
Another fix for this problem.

The last patch leaks memory when the function is successful. Does this patch do the trick for you? Let me know and I'll merge it.
Comment 5 Emilio Pozuelo Monfort 2010-09-16 16:17:19 UTC
Your patch looks much better than mine and is good to fix the FTBFS. Please commit it. Thanks!
Comment 6 Stef Walter 2010-09-16 17:14:10 UTC
Great. Patch was inlcuded in 2.31.92.