diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2018-12-27 10:33:52 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2018-12-27 10:33:52 +0000 |
commit | 466c1be273ce2f7354532f876250cbc3d9d6cefd (patch) | |
tree | 96125dbdd41c4501c72a67daacb90e995b73b72c /src/LYStrings.c | |
parent | fd8ff03480d588c28b9424f2976beadbe7a55a35 (diff) | |
download | lynx-snapshots-466c1be273ce2f7354532f876250cbc3d9d6cefd.tar.gz |
snapshot of project "lynx", label v2-9-0dev_0b
Diffstat (limited to 'src/LYStrings.c')
-rw-r--r-- | src/LYStrings.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/LYStrings.c b/src/LYStrings.c index e1845bb1..3fb31faa 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1,4 +1,4 @@ -/* $LynxId: LYStrings.c,v 1.273 2018/05/04 23:29:29 tom Exp $ */ +/* $LynxId: LYStrings.c,v 1.275 2018/12/27 10:32:15 tom Exp $ */ #include <HTUtils.h> #include <HTCJK.h> #include <UCAux.h> @@ -3226,9 +3226,11 @@ int LYEditInsert(FieldEditor * edit, unsigned const char *s, } else utfbuf[0] = (char) ucode; } - StrNCpy(Buffer + off, utfbuf, l); - edited = 1; - off += l; + if ((size_t) (off + l) <= BufAlloc) { + memcpy(Buffer + off, utfbuf, (size_t) l); + edited = 1; + off += l; + } s++; } if (tail) |