mirror of https://github.com/Cisco-Talos/clamav
Apply both .cdiff and .script CVD patches. Note: A script is a non-compressed and unsigned file containing cdiff commands. There is no header or footer that should be processed. This Rust-based implementation of the cdiff-apply feature includes equivalent features as found in the C-based implementation: - cdiff file signature validation against sha256 of the file contents - Gz decoding of file contents - File open command - File close command - Signature add command - Line delete command - Xchg command - Move command - Unlink command This Rust implementation adds cdiff-apply unit tests to verify correct functionality.pull/424/head
parent
1fbf6ae4f0
commit
dda0a70d90
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@ |
||||
/*
|
||||
* Copyright (C) 2006 Sensory Networks, Inc. |
||||
* (C) 2007 Tomasz Kojm <tkojm@clamav.net> |
||||
* Written by Tomasz Kojm |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License version 2 as |
||||
* published by the Free Software Foundation. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
#ifndef __CDIFF_H |
||||
#define __CDIFF_H |
||||
|
||||
int cdiff_apply(int fd, unsigned short mode); |
||||
|
||||
#endif |
||||
@ -0,0 +1,16 @@ |
||||
/* Copyright (C) 2021 Cisco Systems, Inc. and/or its affiliates. All rights reserved. */ |
||||
|
||||
#ifndef __RDIFF_H |
||||
#define __RDIFF_H |
||||
|
||||
/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ |
||||
|
||||
#include <stdarg.h> |
||||
#include <stdbool.h> |
||||
#include <stdint.h> |
||||
#include <stdlib.h> |
||||
|
||||
|
||||
int32_t cdiff_apply(int32_t file_descriptor, uint16_t mode); |
||||
|
||||
#endif /* __RDIFF_H */ |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue