tech-userlevel archive

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

Re: rpcgen(1), issues with System XVI



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 20.09.2015 13:29, Paul Goyette wrote:
> On Sun, 20 Sep 2015, Kamil Rytarowski wrote:
> 
>> --[PinePGP]--------------------------------------------------[begin]-
- -
>>
>> 
I was playing with System XVI [1] and I have found two bugs in rpcgen(1)
>> : - NULL pointer dereference in rpc_hout.c:pargdef(), -
>> generating invalid symbol names for header guards.
>> 
>> The patches are attached to this mail.
>> 
>> OK to commit?
> 
> The first one looks OK.  I'm not sufficiently familiar with the rpc
> code to tell if the second patch (symbol manipulation) is correct.
> It LGTM but would prefer you wait on this until someone else gives
> a "GO".
> 

Thanks!

I'm adding new patch against rpcgen(1).

For newstyle we generate oldstyle code. This bug has been fixed in
FreeBSD on 13 Dec 1995 by wpaul [1].

With this third patch I have got more progress in porting.

OK to commit?

[1]
https://github.com/freebsd/freebsd/commit/15a1e09c3d41cb01afc70a2ea4d20c
5a0d09348a

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJV/qaiAAoJEEuzCOmwLnZsAAcP/3lil9FTohbExOVzcxZN0u6c
V8pvD5QXuV6aqVi3VzpSe8zS3YeRxRbl+BuQErmnNrDhh8i63t6ZQOuxtYDlHM2Q
HSVljn1hIAYjSjKQAmkzjFnrWAnagED1NzSBQYFdOvxzneAJwrBneexi0OjdGtKC
3RPnt2ogXR7dTezcMnzxtkSjVjHNK56PVWEGrxR+oOgtXwka3Yiz3Hl+UMcX6QC1
ttHWHKwKWVIgPTpj6oLwsI+3JNWa4zHeDog6/0TbKtKJ/jF/Ncpt8v0U//AysaeE
eetilFCZHZTDtsaxHEg+2GiqX/4t8Rl9dzmRWCz1G8ZcYn/MRw57Xn5tdilnUuyc
2QGwM1qtsaHrYu7x1bJ6qvng7nmHtxMbUx7Tp8F69LBUyh6VvS5t5a8yR5fk13Jb
nAe0anw/4xKQAAyjBdlJlzTxqlAEwrre39/wt5zbJQkHDB3CV0Zq7c0ZGhioTHhd
DcOa5P0TJqyAKm30LPujZqEBm8aP1NgZOy7SuejDPHDvPFfMtJ8fmUpqwq+5/cR2
7B04TW9mGWFxOriWhY+t9TG7Kn/ir8MWQyOddPP9aIz33uPj2NUcU4MT6J48ocFh
2dX2bbqGp2B+vNBpkAIPbJzX16qkLVExz967tzdX6Eo8rtxvSYjbNvyQfAN+MXvn
MdKUQ0J42aV9+AdtgUq3
=tsmC
-----END PGP SIGNATURE-----
Index: rpc_svcout.c
===================================================================
RCS file: /cvsroot/src/usr.bin/rpcgen/rpc_svcout.c,v
retrieving revision 1.29
diff -u -r1.29 rpc_svcout.c
--- rpc_svcout.c	9 May 2015 21:44:47 -0000	1.29
+++ rpc_svcout.c	20 Sep 2015 12:29:12 -0000
@@ -449,9 +449,12 @@
 				    "\t\t%s = (char *(*)(char *, struct svc_req *))",
 				    ROUTINE);
 
-			if (newstyle)	/* new style: calls internal routine */
+			if (newstyle) {	/* new style: calls internal routine */
 				f_print(fout, "_");
-			pvname_svc(proc->proc_name, vp->vers_num);
+				pvname(proc->proc_name, vp->vers_num);
+			} else {
+				pvname_svc(proc->proc_name, vp->vers_num);
+			}
 			f_print(fout, ";\n");
 			f_print(fout, "\t\tbreak;\n\n");
 		}


Home | Main Index | Thread Index | Old Index