WS_getpeername buffer length fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



While running the Win32 version of perl under Wine (don't ask), I 
noticed that WS_getpeername wasn't returning the length of the output if 
the buffer was larger than needed.  The app was calling getpeername with 
a 256-byte buffer and expecting *namelen to be 16 afterward.  The most 
logical place to fix this was in ws_sockaddr_u2ws.  Other APIs call this 
function, but I think they would also expect the same behavior so it 
should be ok.

The one-line addition below takes care of the problem.

Changelog:
  dlls/winsock/socket.c
  Paul Rupe <prupe@nc.rr.com>
  Return length of WS_sockaddr structure in ws_sockaddr_u2ws.


-- 
Paul Rupe                                        "She smiled, in the end."
p r u p e @ n c . r r . c o m

begin 644 sockaddr.dff
M26YD97@Z(&1L;',O=VEN<V]C:R]S;V-K970N8PH]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]"E)#4R!F:6QE.B`O:&]M92]W:6YE+W=I;F4O9&QL<R]W:6YS;V-K
M+W-O8VME="YC+'8*<F5T<FEE=FEN9R!R979I<VEO;B`Q+C<R"F1I9F8@+74@
M+7(Q+C<R('-O8VME="YC"BTM+2!D;&QS+W=I;G-O8VLO<V]C:V5T+F,),C`P
M,2\Q,B\R-"`R,#HS,#HR-@DQ+C<R"BLK*R!D;&QS+W=I;G-O8VLO<V]C:V5T
M+F,),C`P,B\P,2\P."`R,SHR.#HP,`I`0"`M.#DV+#8@*S@Y-BPW($!`"B`*
M("`@("!D969A=6QT.@H@("`@("`@("`O*B!.;R!C;VYV97)S:6]N(&YE961E
M9"`J+PHK("`@("`@("`J=W-A9&1R;&5N(#T@;6EN*"IW<V%D9')L96XL=6%D
M9')L96XI.PH@("`@("`@("!M96UC<'DH=W-A9&1R+'5A9&1R+"IW<V%D9')L
M96XI.PH@("`@("`@("!R97,]*"IW<V%D9')L96X\=6%D9')L96X_+3$Z,"D[
("B`@("`@?0JT
`
end





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux