~ubuntu-branches/ubuntu/natty/clamav/natty-security

« back to all changes in this revision

Viewing changes to libclamav/bytecode_vm.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2011-02-19 09:51:33 UTC
  • mfrom: (0.35.19 sid)
  • Revision ID: james.westby@ubuntu.com-20110219095133-sde2dyj8a6bjbkdh
Tags: 0.97+dfsg-0ubuntu1
* Merge from debian unstable (0ubuntu1 because the Debian upload was
  inadvertently left marked UNRELEASED).  Remaining changes:
  - Drop initial signature definitions from clamav-base
  - Drop build-dep on electric-fence (in Universe)
  - Add apparmor profiles for clamd and freshclam along with maintainer
    script changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
    entry->bb_inst = bb_inst;
227
227
    /* we allocated room for values right after stack_entry! */
228
228
    entry->values = values = (char*)&entry[1];
229
 
 
230
229
    memcpy(&values[func->numBytes - func->numConstants*8], func->constants,
231
230
           sizeof(*values)*func->numConstants*8);
232
231
    return entry;
1125
1124
                break;
1126
1125
            }
1127
1126
            DEFINE_OP(OP_BC_MEMCPY) {
1128
 
                int32_t arg3;
 
1127
                int64_t arg3;
1129
1128
                void *arg1, *arg2;
1130
1129
                int64_t res=0;
1131
1130
 
1132
1131
                READ32(arg3, inst->u.three[2]);
1133
1132
                READPOP(arg1, inst->u.three[0], arg3);
1134
1133
                READPOP(arg2, inst->u.three[1], arg3);
1135
 
                memcpy(arg1, arg2, arg3);
 
1134
                memcpy(arg1, arg2, (int32_t)arg3);
1136
1135
/*              READ64(res, inst->u.three[0]);*/
1137
1136
                WRITE64(inst->dest, res);
1138
1137
                break;
1139
1138
            }
1140
1139
            DEFINE_OP(OP_BC_MEMMOVE) {
1141
 
                int32_t arg3;
 
1140
                int64_t arg3;
1142
1141
                void *arg1, *arg2;
1143
1142
                int64_t res=0;
1144
1143
 
1145
 
                READ32(arg3, inst->u.three[2]);
 
1144
                READ64(arg3, inst->u.three[2]);
1146
1145
                READPOP(arg1, inst->u.three[0], arg3);
1147
1146
                READPOP(arg2, inst->u.three[1], arg3);
1148
 
                memmove(arg1, arg2, arg3);
 
1147
                memmove(arg1, arg2, (int32_t)arg3);
1149
1148
/*              READ64(res, inst->u.three[0]);*/
1150
1149
                WRITE64(inst->dest, res);
1151
1150
                break;
1152
1151
            }
1153
1152
            DEFINE_OP(OP_BC_MEMSET) {
1154
 
                int32_t arg2, arg3;
 
1153
                int64_t arg3;
 
1154
                int32_t arg2;
1155
1155
                void *arg1;
1156
1156
                int64_t res=0;
1157
1157
 
1158
 
                READ32(arg3, inst->u.three[2]);
 
1158
                READ64(arg3, inst->u.three[2]);
1159
1159
                READPOP(arg1, inst->u.three[0], arg3);
1160
1160
                READ32(arg2, inst->u.three[1]);
1161
 
                memset(arg1, arg2, arg3);
 
1161
                memset(arg1, arg2, (int32_t)arg3);
1162
1162
/*              READ64(res, inst->u.three[0]);*/
1163
1163
                WRITE64(inst->dest, res);
1164
1164
                break;