[OpenSIPS-Devel] [OpenSIPS/opensips] 2d98ee: jabber: Fix off-by-one strncpy() error

Liviu Chircu noreply at github.com
Wed Jul 21 12:51:35 EST 2021


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2d98eefa0c1963f22b063aa5514ce44d82160387
      https://github.com/OpenSIPS/opensips/commit/2d98eefa0c1963f22b063aa5514ce44d82160387
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-07-21 (Wed, 21 Jul 2021)

  Changed paths:
    M modules/jabber/xjab_wlist.c

  Log Message:
  -----------
  jabber: Fix off-by-one strncpy() error

warning: ‘__builtin_strncpy’ output truncated before terminating nul
copying as many bytes from a string as its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bo...
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
xjab_wlist.c: In function ‘xj_wlist_set_aliases’:
xjab_wlist.c:455:34: note: length computed here
  455 |   i = jwl->aliases->proxy->len = strlen(pa);
      |                                  ^~~~~~~~~~





More information about the Devel mailing list