[PATCH] smbcontrol smbd ping
Volker.Lendecke at SerNet.DE
Fri Aug 21 03:43:39 MDT 2009
On Thu, Aug 20, 2009 at 10:32:37AM +0200, Olaf Flebbe wrote:
> 2) smbcontrol <largeinteger> ping
> triggers weird behaviour. try 2147483649 for instance.
Thanks for your patch! I've read in susv3 about pid_t, and
indeed it is supposed to be a signed type. But I could not
read anything about it actually being an "unsigned int".
According to the spec it might for example be a short.
Passing a pointer to a short to sscanf would make sscanf
overflow the variable. I think we need to change the
unsigned int vnn, pid;
unsigned int vnn;
instead of having "pid_t pid".
The assignment later on (result.pid = pid) will do the
automatic type-conversion that taking a pointer of a pid_t
could not do.
Can you supply a new patch with that?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the samba-technical