diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/topology/tplg_local.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/topology/tplg_local.h b/src/topology/tplg_local.h index 4d79aa7b..cfde4cc5 100644 --- a/src/topology/tplg_local.h +++ b/src/topology/tplg_local.h @@ -253,6 +253,9 @@ struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg, static inline void elem_copy_text(char *dest, const char *src, int len) { + if (!dest || !src || !len) + return; + strncpy(dest, src, len); dest[len - 1] = 0; } |