gnetlist: Safer use of nettattrib-generated refdes.
commitc58247b598517b875d8cb2b80eb812e92ee9c87f
authorPeter TB Brett <peter@peter-b.co.uk>
Sun, 22 Sep 2013 09:11:23 +0000 (22 10:11 +0100)
committerPeter TB Brett <peter@peter-b.co.uk>
Sun, 22 Sep 2013 09:11:23 +0000 (22 10:11 +0100)
tree07288f6aea3d6f73c39701cd40985eaffe820b2c
parented432e7e2ff1c38d2b04608b2d0287e137788c1e
gnetlist: Safer use of nettattrib-generated refdes.

Two-pronged attack to make gnetlist's use of autogenerated "POWER"
refdes less likely to cause a problem.

1) Use a longer, more specific prefix string.  This will make it much
   much less likely that a collision with a user net name will occur.

2) When testing for autogenerated refdes, test for the exact prefix
   using strncmp() instead of just checking that it appears somewhere
   in the string.

Affects-bug: lp-1226246
gnetlist/include/prototype.h
gnetlist/src/s_net.c
gnetlist/src/s_netattrib.c
gnetlist/src/s_traverse.c