Various error handling issues with signGP.c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
x-loader (Ubuntu) |
Fix Released
|
Undecided
|
Loïc Minier | ||
x-loader-omap4 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi
There are various issues with the signGP.c in x-loader (added by debian/
- it's built with "$(CC) -o signGP signGP.c" which is not policy compliant as it doesn't turn on warnings, or debug symbols, or optimizations -- this would probably have catched the last error listed below
- it returns zero exit status upon error:
+ // Open the input file.
+ ifile = fopen(ifname, "rb");
+ if (ifile == NULL) {
+ printf("Cannot open %s\n", ifname);
+ exit(0);
+ }
- it doesn't return any specific exit status in main():
+main(int argc, char *argv[])
+{
[...]
+ fclose(ifile);
+ fclose(ofile);
+}
So signGP should be fixed to:
- be built with -Wall -g -O2
- return 1 for every error condition
- return 0 explicitly at end of build
Cheers,
tags: | added: armel |
Changed in x-loader (Ubuntu): | |
assignee: | nobody → Ricardo Salveti (rsalveti) |
Changed in x-loader (Ubuntu): | |
assignee: | Ricardo Salveti (rsalveti) → Loïc Minier (lool) |
This bug was fixed in the package x-loader - 1.4.4git2010071 3-1ubuntu5
--------------- 13-1ubuntu5) natty; urgency=low
x-loader (1.4.4git201007
* Various error handling issues with signGP.c; LP: #669275.
- debian/signGP: return 0 at end of main(), and return 1 instead of
exit(0) on failure conditions.
- rules: pass CFLAGS to CC when building signGP.
-- Loic Minier <email address hidden> Sun, 05 Dec 2010 03:12:34 +0100