Otavio Salvador wrote:
> >From my side you have a "go ahead" but I'd like to hear from Colin and
> Joey if they can think about any con about doing it.

No objection to the concept. 

Code review:

+       while (fgets(buf, sizeof(buf), infp)) {
+               if (strncmp(buf, "data.tar.", 9) == 0) {
+                       compression_type = buf + 9;
+                       break;
+               }
+       }

There is no point in looping here, because if the ar -t output is somehow
longer than sizeof(buf), the data.tar.* output could be split across buffers
and so you've already lost. Anyway, with a buffer of 8192, that won't
happen unless the deb format changes in a very unexpected way.

FWIW, this code would fail if the dpkg format got a new member named something
like data.tar.gz.sign.


+       puts(buf);

leftover debugging?

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to