lib: Fix server_id_from_string
authorVolker Lendecke <vl@samba.org>
Tue, 29 Sep 2015 18:08:48 +0000 (20:08 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 30 Sep 2015 21:51:13 +0000 (23:51 +0200)
commita4f64500a5c3c89aae0c6eb15e994898d0ce38e7
treec0facfd672b1cffad7ad862567f74b6f92fe374d
parent8044e2dcc074ade554150ebc11b60d91db025f63
lib: Fix server_id_from_string

sscanf overwrites vars as numbers come in. So the first sscanf will
overwrite "vnn", although it can't scan the whole thing. This leads
to the string "1234" return .vnn=1234, pid=1234. Bad.

While there, save the temp variables. The SCNu32/64 thingies look
ugly, but it's actually c99.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/server_id.c