diff options
author | Pierre-Eric Pelloux-Prayer <[email protected]> | 2020-04-16 10:24:24 +0200 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <[email protected]> | 2020-04-21 09:16:26 +0200 |
commit | 07071cac7b97b20ba3b5a633171af7ac8ac09d00 (patch) | |
tree | 45dbfa0520014b47536df422a024df5919e12e2a /src/gallium/auxiliary/util | |
parent | dbfeec62c3852293d5f029db73ff7d63ff0f14e5 (diff) |
gallium/utils: silence strncpy warning
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_debug_symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c index f576a51fe99..334803d008e 100644 --- a/src/gallium/auxiliary/util/u_debug_symbol.c +++ b/src/gallium/auxiliary/util/u_debug_symbol.c @@ -234,7 +234,7 @@ debug_symbol_name_glibc(const void *addr, char* buf, unsigned size) if (!syms) { return FALSE; } - strncpy(buf, syms[0], size); + strncpy(buf, syms[0], size - 1); buf[size - 1] = 0; free(syms); return TRUE; |