adamsutton / tvheadend

Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.
http://www.lonelycoder.com/hts/tvheadend_overview.html
Other
18 stars 5 forks source link

strncpy overlap #81

Closed btwe closed 10 years ago

btwe commented 10 years ago

src/input/mpegts/dvb_psi.c:323:

str = sname;
while (*str && *str <= 32)
  str++;
strncpy(sname, str, sname_len); // Note: could avoid this copy by passing an output ptr

you set str = sname and then try to copy it, probably strncpy this is leftover code ...

adamsutton commented 10 years ago

@btwe there are possibly some portability issues on some weird platforms. But this is generally a safe thing to do. What's your concern?