gnetlist: Safer use of nettattrib-generated refdes.
commita50a23a0acc0fecc928343e596b404b6bf18c6b9
authorPeter TB Brett <peter@peter-b.co.uk>
Sun, 22 Sep 2013 09:22:28 +0000 (22 10:22 +0100)
committerPeter TB Brett <peter@peter-b.co.uk>
Sun, 22 Sep 2013 09:22:28 +0000 (22 10:22 +0100)
tree40e47817edafcfed56261ccaebe12e501a9a7a11
parent75799ed43559cd3006cf58ec0b90f839472b5dfe
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

(imported from commit c58247b598517b875d8cb2b80eb812e92ee9c87f)
gnetlist/include/prototype.h
gnetlist/src/s_net.c
gnetlist/src/s_netattrib.c
gnetlist/src/s_traverse.c