1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
/*
* secstr.h - secure_strncpy() declaration
* $Id: secstr.h 151 2004-06-05 15:15:18Z rdenisc $
*/
/***********************************************************************
* Copyright (C) 2002-2004 Remi Denis-Courmont. *
* This program is free software; you can redistribute and/or modify *
* it under the terms of the GNU General Public License as published *
* by the Free Software Foundation; version 2 of the license. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, you can get it from: *
* http://www.gnu.org/copyleft/gpl.html *
***********************************************************************/
#ifndef __SAFE_STRING_H
# define __SAFE_STRING_H
# include <stdio.h>
# include <string.h>
# ifdef __cplusplus
extern "C" {
# endif
char *secure_strncpy (char *dest, const char *src, size_t n);
int secure_snprintf (char *buf, size_t len, const char *fmt, ...);
# ifdef __cplusplus
}
# endif
#endif
|