~ubuntu-branches/ubuntu/precise/clamav/precise-updates

« back to all changes in this revision

Viewing changes to libclamav/jsparse/js-norm.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-01-30 09:01:52 UTC
  • mfrom: (118.1.5 precise-security)
  • Revision ID: package-import@ubuntu.com-20150130090152-es6oz6eg0wsa4r40
Tags: 0.98.6+dfsg-0ubuntu0.12.04.1
* Updated to 0.98.6 to fix security issues, including CVE-2014-9328.
* Removed upstreamed patches:
  - d/p/0002-Add-an-additional-n-after-the-number-in-the-pidfile.patch
  - d/p/0017-Bump-.so-version-number.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
525
525
{
526
526
        const size_t len = with ? with->cnt : 0;
527
527
        size_t i;
528
 
        cli_dbgmsg(MODULE "Replacing tokens %lu - %lu with %lu tokens\n",start, end, len);
 
528
        cli_dbgmsg(MODULE "Replacing tokens %lu - %lu with %lu tokens\n", (unsigned long)start,
 
529
                   (unsigned long)end, (unsigned long)len);
529
530
        if(start >= dst->cnt || end > dst->cnt)
530
531
                return -1;
531
532
        for(i=start;i<end;i++) {
547
548
                return CL_ENULLARG;
548
549
        if(tokens_ensure_capacity(dst, dst->cnt + src->cnt))
549
550
                return CL_EMEM;
550
 
        cli_dbgmsg(MODULE "Appending %lu tokens\n", src->cnt);
 
551
        cli_dbgmsg(MODULE "Appending %lu tokens\n", (unsigned long)(src->cnt));
551
552
        memcpy(&dst->data[dst->cnt], src->data, src->cnt * sizeof(dst->data[0]));
552
553
        dst->cnt += src->cnt;
553
554
        return CL_SUCCESS;
1110
1111
                                TOKEN_SET(&val, scope, state->current);
1111
1112
                                break;
1112
1113
                        case TOK_StringLiteral:
1113
 
                                if(state->tokens.cnt > 0 && state->tokens.data[state->tokens.cnt-1].type == TOK_PLUS) {
 
1114
                                if(state->tokens.cnt > 1 && state->tokens.data[state->tokens.cnt-1].type == TOK_PLUS) {
1114
1115
                                        /* see if can fold */
1115
1116
                                        yystype *prev_string = &state->tokens.data[state->tokens.cnt-2];
1116
1117
                                        if(prev_string->type == TOK_StringLiteral) {