2
* Copyright (C) 2012 Sourcefire, Inc.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30
#ifndef STATUS_DEVICE_DATA_ERROR
31
#define STATUS_DEVICE_DATA_ERROR 0xC000009C
36
static int filter_memcpy(unsigned int code, struct _EXCEPTION_POINTERS *ep) {
37
if ((code == EXCEPTION_IN_PAGE_ERROR) || (code == STATUS_DEVICE_DATA_ERROR)) {
38
return EXCEPTION_EXECUTE_HANDLER;
40
return EXCEPTION_CONTINUE_SEARCH;
44
int cli_memcpy(void *target, const void *source, unsigned long size)
51
memcpy(target, source, size);
54
__except (filter_memcpy(GetExceptionCode(), GetExceptionInformation())) {