~ubuntu-branches/ubuntu/raring/openafs/raring

« back to all changes in this revision

Viewing changes to src/libacl/aclprocs.c

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-03-05 01:01:49 UTC
  • mfrom: (44.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130305010149-3ui1dhq9a2fw9abp
Tags: 1.6.2-1+ubuntu2
Explicitly include -pthread in UAFS_XLIBS to fix build failure

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#else
24
24
#include <netinet/in.h>
25
25
#endif
 
26
#include <limits.h>
26
27
#include <string.h>
27
28
#include <rx/xdr.h>
28
29
#include <rx/rx.h>
29
30
#include <afs/ptclient.h>
30
31
#include <afs/ptuser.h>
31
32
#include "acl.h"
32
 
 
33
33
#ifdef AFS_PTHREAD_ENV
34
34
#include <assert.h>
35
35
#include <pthread.h>
251
251
 
252
252
    if (sscanf(elist, "%d\n%d\n", &p, &n) != 2)
253
253
        return -1;
254
 
    if (p + n > ACL_MAXENTRIES)
 
254
    if (p < 0 || n < 0 || p > INT_MAX - n || p + n > ACL_MAXENTRIES)
255
255
        return (-1);
256
256
    acl_NewACL(p + n, acl);
257
257
    (*acl)->total = p + n;
276
276
    nextc++;                    /* now at the beginning of the entry list */
277
277
    for (i = 0; i < (*acl)->positive; i++) {
278
278
        int k;
279
 
        if (sscanf(nextc, "%s\t%d\n", lnames.namelist_val[i], &k) != 2) {
 
279
        if (sscanf(nextc, "%63s\t%d\n", lnames.namelist_val[i], &k) != 2) {
280
280
            free(lnames.namelist_val);
281
281
            return (-1);
282
282
        }
288
288
    for (i = (*acl)->total - 1; i >= (*acl)->total - (*acl)->negative;
289
289
         i--, j++) {
290
290
        if (sscanf
291
 
            (nextc, "%s\t%d\n", lnames.namelist_val[j],
 
291
            (nextc, "%63s\t%d\n", lnames.namelist_val[j],
292
292
             &((*acl)->entries[j].rights)) != 2) {
293
293
            free(lnames.namelist_val);
294
294
            return (-1);