aboutsummaryrefslogtreecommitdiffstats
path: root/src/fst
diff options
context:
space:
mode:
Diffstat (limited to 'src/fst')
-rw-r--r--src/fst/fst_ctrl_iface.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fst/fst_ctrl_iface.c b/src/fst/fst_ctrl_iface.c
index 06bba5a5..76d4776b 100644
--- a/src/fst/fst_ctrl_iface.c
+++ b/src/fst/fst_ctrl_iface.c
@@ -842,13 +842,10 @@ int fst_read_next_text_param(const char *params, char *buf, size_t buflen,
size_t max_chars_to_copy;
char *cur_dest;
- if (buflen <= 1)
- return -EINVAL;
-
*endp = (char *) params;
while (isspace(**endp))
(*endp)++;
- if (!**endp)
+ if (!**endp || buflen <= 1)
return -EINVAL;
max_chars_to_copy = buflen - 1;