Description: use size_t for all offsets in mmaped area [ Ruud Schramp ] * Use size_t for offsets, use of ints and unsigned ints leads to crashes * The entropy function assumed to allways be called first with an index of 0 . aeskeyfind (1:1.0-1) unstable; urgency=low . * Team upload. . [ Daniel Baumann ] * Minimizing rules file. * Using debhelper install file rather than adding install target in upstream Makefile. . [ Julien Valroff ] * Fix version number (add an epoch to ensure the new version number is higher than the previously uploaded package) * Bump debhelper compat to 8 * Bump standards version to 3.9.2 (no changes needed) * Switch to 3.0 (quilt) source package format * Add watch file * Add manpage * Fix VCS* fields * Move to `utils' section as per the override * Update copyright file as per current DEP-5 * Remove useless lintian override: use Team Upload entry * Update short description and complete long description Author: Julien Valroff --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- aeskeyfind-1.0.orig/aeskeyfind.c +++ aeskeyfind-1.0/aeskeyfind.c @@ -90,12 +90,12 @@ static void print_key(uint32_t* map, int // more than 8 repeats of any byte. This is a primitive measure of // entropy, but it works well enough. The function keeps track of a // sliding window of byte counts. -static int entropy(const uint8_t* bmap, int i) +static int entropy(const uint8_t* bmap, size_t i) { static int new_call = 1; static int byte_freq[256] = {0}; if (new_call) { - for (int i=0; i<176; i++) byte_freq[bmap[i]]++; + for (int j=0; j<176; j++) byte_freq[bmap[j+i]]++; new_call = 0; } @@ -208,7 +208,7 @@ static void find_keys(const uint8_t* bma // Memory maps filename and return a pointer on success, setting len // to the length of the file (does not return on error) -unsigned char *map_file(char *filename, unsigned int *len) { +unsigned char *map_file(char *filename, size_t *len) { int fd = open(filename, O_RDONLY); if (fd < 0) err(1, "image open failed"); @@ -265,7 +265,7 @@ int main(int argc, char * argv[]) exit(1); } - unsigned int len; + size_t len; unsigned char *image = map_file(argv[0], &len); if (len < 240) { fprintf(stderr, "memory image too small\n");