pkgng/pkgng — Issue #160: pkg create may suddenly return 0
Author: z0nt
Created: 2012-02-27 09:05:29+00:00
State: open

I see a bug in pkg/create.c in pkg_create_matches() function. Variable retcode may be set to any positive number, but exitcode can't be greater than 255, any other codes would be devided by remainder 256.

test.c:
int
main(void)
{
return 256;
}
$ gcc -o test test.c
$ ./test
$ echo $?
0
$