Bug 1233346: r=ekr a=abillings
authorNils Ohlmeier <drno@ohlmeier.org>
Tue, 29 Dec 2015 20:45:02 -0500
changeset 305918 bc679c4aeb59f7712abaa3edff02debfef8ff317
parent 305917 0789488640762cf6c601f33b801d290e1861f70e
child 305919 d90ed2651b3d59c07ab0d13ea1c467d3c19856f3
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr, abillings
bugs1233346
milestone44.0
Bug 1233346: r=ekr a=abillings
media/mtransport/third_party/nICEr/src/stun/addrs.c
--- a/media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ b/media/mtransport/third_party/nICEr/src/stun/addrs.c
@@ -185,16 +185,18 @@ stun_get_win32_addrs(nr_local_addr addrs
 
     for (tmpAddress = AdapterAddresses; tmpAddress != NULL; tmpAddress = tmpAddress->Next) {
       char *c;
 
       if (tmpAddress->OperStatus != IfOperStatusUp)
         continue;
 
       snprintf(munged_ifname, IFNAMSIZ, "%S%c", tmpAddress->FriendlyName, 0);
+      munged_ifname[IFNAMSIZ-1] = '\0';
+
       /* replace spaces with underscores */
       c = strchr(munged_ifname, ' ');
       while (c != NULL) {
         *c = '_';
          c = strchr(munged_ifname, ' ');
       }
       c = strchr(munged_ifname, '.');
       while (c != NULL) {