2010-07-27
2010-07-27 16:46:06 by Martin Stjernholm <mast@lysator.liu.se>
-
ddc1a3e385faa982e73099884ab0f6b1b242561a
(9 lines)
(+5/-4)
[
Show
| Annotate
]
Branch: 7.9
Fixed several cases of unsafe use of get_all_args for optional args.
Rev: src/builtin_functions.c:1.704
Rev: src/cpp.c:1.178
Rev: src/modules/Gettext/gettext.c:1.28
Rev: src/modules/Image/font.c:1.92
Rev: src/modules/_Roxen/roxen.c:1.56
Rev: src/modules/files/socket.c:1.112
Rev: src/modules/files/udp.c:1.84
Rev: src/post_modules/GTK2/source/gnomecanvas.pre:1.8
Rev: src/post_modules/GTK2/source/gtksourceiter.pre:1.7
Rev: src/post_modules/GTK2/source/gtktextiter.pre:1.14
2:
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
- || $Id: builtin_functions.c,v 1.703 2010/07/27 15:33:37 mast Exp $
+ || $Id: builtin_functions.c,v 1.704 2010/07/27 16:46:01 mast Exp $
*/
#include "global.h"
2886:
PMOD_EXPORT void f_crypt(INT32 args)
{
char salt[2];
- char *ret, *pwd, *saltp;
+ char *ret, *pwd, *saltp = NULL;
char *choise =
"cbhisjKlm4k65p7qrJfLMNQOPxwzyAaBDFgnoWXYCZ0123tvdHueEGISRTUV89./";
get_all_args("crypt", args, "%s.%s", &pwd, &saltp);
- if(args>1)
+ if(saltp)
{
if( Pike_sp[1-args].u.string->len < 2 )
{
5501: Inside #if defined (HAVE_MKTIME) || defined (HAVE_LOCALTIME)
PMOD_EXPORT void f_mktime (INT32 args)
{
INT_TYPE sec, min, hour, mday, mon, year;
- INT_TYPE isdst = -1, tz;
+ INT_TYPE isdst = -1, tz = 0;
struct tm date;
time_t retval;