commit
e9d621a59c
2 changed files with 38 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
--- parse_options_getopt.c.dt
|
||||
+++ parse_options_getopt.c
|
||||
@@ -178,15 +178,17 @@ struct detox_options *parse_options_geto
|
||||
main_options->files = malloc(sizeof(char *) * 10);
|
||||
|
||||
i = 0;
|
||||
- max = 0;
|
||||
+ max = 10;
|
||||
|
||||
if (optind < argc) {
|
||||
while (optind < argc) {
|
||||
- main_options->files[i++] = strdup(argv[optind]);
|
||||
- if (i > max) {
|
||||
+ /* not enough space for the next file and
|
||||
+ possible ending NULL -> realloc */
|
||||
+ if (i + 2 > max) {
|
||||
main_options->files = realloc(main_options->files, sizeof(char *) * (10 + max));
|
||||
max += 10;
|
||||
}
|
||||
+ main_options->files[i++] = strdup(argv[optind]);
|
||||
|
||||
optind++;
|
||||
}
|
15
srcpkgs/detox/template
Normal file
15
srcpkgs/detox/template
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Template file for 'detox'
|
||||
|
||||
pkgname="detox"
|
||||
version="1.2.0"
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--sysconfdir=/etc/detox"
|
||||
hostmakedepends="flex"
|
||||
makedepends="libfl-devel"
|
||||
short_desc="Utility designed to clean up filenames"
|
||||
maintainer="Martin Födinger <foedinger.martin@autistici.org>"
|
||||
license="BSD"
|
||||
homepage="http://detox.sourceforge.net/"
|
||||
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
|
||||
checksum="abfad90ee7d3e0fc53ce3b9da3253f9a800cdd92e3f8cc12a19394a7b1dcdbf8"
|
Loading…
Reference in a new issue