=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/lesskey.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -c -r1.1.1.3 -r1.1.1.4 *** src/usr.bin/less/lesskey.c 2011/09/16 17:47:06 1.1.1.3 --- src/usr.bin/less/lesskey.c 2014/04/25 13:33:48 1.1.1.4 *************** *** 1,11 **** /* ! * Copyright (C) 1984-2011 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * ! * For more information about less, or for information on how to ! * contact the author, see the README file. */ --- 1,10 ---- /* ! * Copyright (C) 1984-2012 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. * ! * For more information, see the README file. */ *************** *** 112,117 **** --- 111,117 ---- { "flush-repaint", A_FREPAINT }, { "forw-bracket", A_F_BRACKET }, { "forw-forever", A_F_FOREVER }, + { "forw-until-hilite", A_F_UNTIL_HILITE }, { "forw-line", A_F_LINE }, { "forw-line-force", A_FF_LINE }, { "forw-screen", A_F_SCREEN }, *************** *** 227,237 **** char *filename; { char *pathname; ! pathname = calloc(strlen(dirname) + strlen(filename) + 2, sizeof(char)); ! strcpy(pathname, dirname); ! strcat(pathname, PATHNAME_SEP); ! strcat(pathname, filename); return (pathname); } --- 227,239 ---- char *filename; { char *pathname; + size_t len; ! len = strlen(dirname) + strlen(filename) + 2; ! pathname = calloc(len, sizeof(char)); ! strlcpy(pathname, dirname, len); ! strlcat(pathname, PATHNAME_SEP, len); ! strlcat(pathname, filename, len); return (pathname); } *************** *** 449,455 **** } case '^': /* ! * Carat means CONTROL. */ *pp = p+2; buf[0] = CONTROL(p[1]); --- 451,457 ---- } case '^': /* ! * Caret means CONTROL. */ *pp = p+2; buf[0] = CONTROL(p[1]); *************** *** 783,793 **** char *path = getenv("HOMEPATH"); if (drive != NULL && path != NULL) { ! char *env = (char *) calloc(strlen(drive) + ! strlen(path) + 6, sizeof(char)); ! strcpy(env, "HOME="); ! strcat(env, drive); ! strcat(env, path); putenv(env); } } --- 785,795 ---- char *path = getenv("HOMEPATH"); if (drive != NULL && path != NULL) { ! size_t len = strlen(drive) + strlen(path) + 6; ! char *env = (char *) calloc(len, sizeof(char)); ! strlcpy(env, "HOME=", len); ! strlcat(env, drive, len); ! strlcat(env, path, len); putenv(env); } }