/*
- * $Id: auth.c,v 1.7 2005-04-28 20:49:49 bfernhomberg Exp $
+ * $Id: auth.c,v 1.8 2009-02-02 16:04:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
char name[MAXPATHLEN + 1], buf[MAXPATHLEN + 1], *p;
struct uam_mod *mod;
struct stat st;
- int len;
+ size_t len;
if (!path || !list || (len = strlen(path)) > sizeof(name) - 2)
return -1;
/*
- * $Id: magics.c,v 1.13 2009-02-02 10:31:32 didg Exp $
+ * $Id: magics.c,v 1.14 2009-02-02 16:04:33 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
}
- if ( stop - p >= strlen( Query ) &&
+ if ( (size_t)(stop - p) >= strlen( Query ) &&
strncmp( p, Query, strlen( Query )) == 0 ) {
if ( comswitch( magics, cm_psquery ) < 0 ) {
LOG(log_error, logtype_papd, "cm_psswitch: can't find psquery!" );
/*
- * $Id: queries.c,v 1.20 2009-02-02 12:46:45 didg Exp $
+ * $Id: queries.c,v 1.21 2009-02-02 16:04:33 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
break;
}
}
- p++;
- while ( *p == ' ' ) {
+ if (p < stop) {
p++;
+ while ( *p == ' ' ) {
+ p++;
+ }
}
append( out, p, stop - p + crlflength );
bzero( &tkt, sizeof( tkt ));
stop = start+linelength;
+ /* FIXME */
for ( i = 0, t = tkt.dat; p < stop; p += 2, t++, i++ ) {
*t = ( h2b( (unsigned char)*p ) << 4 ) +
h2b( (unsigned char)*( p + 1 ));
}
}
- for ( p++; p < stop; p++ ) {
+ if (p < stop) for ( p++; p < stop; p++ ) {
if ( *p != ' ' && *p != '\t' ) {
break;
}
}
for ( gq = genqueries; gq->gq_name; gq++ ) {
- if (( strlen( gq->gq_name ) == q - p ) &&
+ if (( strlen( gq->gq_name ) == (size_t)(q - p) ) &&
( strncmp( gq->gq_name, p, q - p ) == 0 )) {
break;
}
break;
}
}
- p++;
+ if (p < stop)
+ p++;
cq_font_answer( p, stop, out );
} else {
break;
}
}
- p++;
+ if (p < stop)
+ p++;
cq_font_answer( p, stop, out );
} else {
break;
}
}
- p++;
+ if (p < stop)
+ p++;
while ( *p == ' ' ) {
p++;
}