X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fstrings.c;h=393d8e7cab3e4b6e968cc395aec3cf67ec8b2a50;hp=78cd2ef4f5f510ca7a4bdc36349b9f9d62f81626;hb=ee27d238caeccd1ed781a92957afbdb890e1e88f;hpb=cd858895e9086dadfb3d0a9ae69bc906de6330ea;ds=sidebyside diff --git a/ncurses/tinfo/strings.c b/ncurses/tinfo/strings.c index 78cd2ef4..393d8e7c 100644 --- a/ncurses/tinfo/strings.c +++ b/ncurses/tinfo/strings.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2000-2003,2007 Free Software Foundation, Inc. * + * Copyright (c) 2000-2007,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: strings.c,v 1.6 2007/08/11 17:12:17 tom Exp $") +MODULE_ID("$Id: strings.c,v 1.8 2012/02/22 22:34:31 tom Exp $") /**************************************************************************** * Useful string functions (especially for mvcur) @@ -110,7 +110,7 @@ _nc_safe_strcat(string_desc * dst, const char *src) if (len < dst->s_size) { if (dst->s_tail != 0) { - strcpy(dst->s_tail, src); + _nc_STRCPY(dst->s_tail, src, dst->s_size); dst->s_tail += len; } dst->s_size -= len; @@ -131,7 +131,7 @@ _nc_safe_strcpy(string_desc * dst, const char *src) if (len < dst->s_size) { if (dst->s_head != 0) { - strcpy(dst->s_head, src); + _nc_STRCPY(dst->s_head, src, dst->s_size); dst->s_tail = dst->s_head + len; } dst->s_size = dst->s_init - len;