diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-05-11 00:58:05 (GMT) |
commit | 46bcc7f122245f22772fd3e38d16e6afa7bd5881 (patch) | |
tree | d3c2ba1a9999e373428954f24d0e60c1ea63b756 /src/arch/vmpa.c | |
parent | 1bda6c517d30d873ff0d92a96380946ef944c9ae (diff) |
Provided a way to look for ROP gadgets in binary code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@533 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/vmpa.c')
-rw-r--r-- | src/arch/vmpa.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/arch/vmpa.c b/src/arch/vmpa.c index ad4c078..b10b007 100644 --- a/src/arch/vmpa.c +++ b/src/arch/vmpa.c @@ -247,6 +247,32 @@ void advance_vmpa(vmpa2t *addr, phys_t qty) /****************************************************************************** * * +* Paramètres : addr = élément à modifier. * +* qty = quantité d'unités de décallage. * +* * +* Description : Décalle une position d'une certaine quantité. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void deminish_vmpa(vmpa2t *addr, phys_t qty) +{ + /* On choisit de ne pas vérifier les débordements */ + + if (addr->physical != VMPA_NO_PHYSICAL) + addr->physical -= qty; + + if (addr->virtual != VMPA_NO_VIRTUAL) + addr->virtual -= qty; + +} + + +/****************************************************************************** +* * * Paramètres : a = première élément à venir consulter. * * b = second élément à traiter en parallèle. * * * |