Bug 4634 - getpeername takes socklen_t, not size_t
Summary: getpeername takes socklen_t, not size_t
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.25
Hardware: x64 FreeBSD
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 16:34 UTC by Mikhail T.
Modified: 2007-05-18 08:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2007-05-17 16:34:59 UTC
At least on FreeBSD and Solaris, getpeername's last argument is a pointer to socklen_t, not size_t.

This matters on 64-bit platforms, where size_t is 64-, but socklen_t -- usually -- still 32-bit wide.

--- libsmb/libsmbclient.c       Mon Apr  9 13:30:58 2007
+++ libsmb/libsmbclient.c       Wed May 16 15:02:12 2007
@@ -501,5 +501,5 @@
                   SMBCSRV * server)
 {
-        size_t size;
+        socklen_t size;
         struct sockaddr addr;
Comment 1 Derrell Lipman 2007-05-18 08:46:11 UTC
Fixed in all branches, R23001-3