]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libthread_db: unsign map_len and use reallocarray(3).
authorPedro F. Giffuni <pfg@FreeBSD.org>
Thu, 20 Apr 2017 17:43:25 +0000 (17:43 +0000)
committerPedro F. Giffuni <pfg@FreeBSD.org>
Thu, 20 Apr 2017 17:43:25 +0000 (17:43 +0000)
commit1f2b051d84547c7ee9a163a267a76e3c8ca4a4fe
tree68513c43c1b0be132373bde685b48ac9a85f13f0
parent2d445fb18c3d0ca4b9673a8a7fda67f57f46e06e
libthread_db: unsign map_len and use reallocarray(3).

Lengths are not negative, so map_len should be unsigned. Unsign the
corresponding indexes too and bring a small use of reallocarray(3).

Reorder the memset to be consistent with the realloc: it appears we
were only clearing half the memory in pt_map_thread().

MFC after: 2 weeks
lib/libthread_db/libpthread_db.c
lib/libthread_db/libpthread_db.h