[cups-devel] [MOD] STR #4403: Race condition in cupsSendRequest()

Ferran Selles noreply at cups.org
Thu Apr 24 23:42:22 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I too can confirm this bug, when trying to compile with --disable-dnssd
- --disable-avahi

I think I can track this bug to Commit:
ebd5991b0fff66a5fa4807b26f75bd40e4d56dce [ebd5991] - (Subversion Revision:
11687), it defines at least 2 new functions:

dnssdDeregisterAllPrinters()
dnssdRegisterAllPrinters()

inside a #if block:

#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)

but are called on lines 262 and 244 from outside any #if block:

I've attached a patch that should solve this problem by moving the
functions outside the #if block, renaming them to

deregister_all_printers()
register_all_printers()

and surrounding code related to DNSSD and AVAHI inside #if blocks.

Link: https://www.cups.org/str.php?L4403
Version: 1.7.1
Attachment: https://www.cups.org/strfiles.php/3313/cups-str4402.patch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTWgPOAAoJENujp6sI12IjmfMP/iVM62SaKzB0OaqkfvDypimo
QRBsWNxsTv66htOOxjeJ1kOK1P2c9gu1U48M92I9CfLWz0ZjkFBlsKlw7gOt422V
YSFobTloUKsGvEdw/CRTSBAfXpsp1gOZR6Qa/mNDE1eWZs0dLUfkIGeRxdQoja6z
b4YfxnvRCPVpHwQRWC5/xMhGZ9CHIN524DLalrETfHQD6it1foWw3osdNc1eTU/V
CuJUZ38k4nO59h6ftEtNNojB+B2znkMXkNOmMAkrSiXwho9AwKS+V2cOjpYDuCDn
+/GDxs/ZnEfoGjj9cli5FWYyYiWuDShj7rULd3kcCsiJmyY+fg2QR2ZeVxWY2/ir
OH66AN2t5TY91tL6SMN7Ns+bXxCETiweTKw1RHoQXIchK4O18PrKD56f4WGcfIYs
6KgDzmTpbrZsYNgaU4skMNOcUqlDZL5Vn00KJ2iMM3C8BPrLv6GdBbxJzv1gwVBl
mqCvFfE6KCoZp+PSidqTs4ADBSf4ym0+5pMEikV5y1eCrc1WVQrf80sEDE4DVzXX
+pW0hd855bxb6XtPjlqESkIAC9fZ762lGGJ0seSxhNI8vUzVab7wRhi71CmLEuHn
PfL9mEJKIwKCXFTlFzFqKqSeAGeUWPcaQS5gQUm3Kxp6xwHxNi5mCFLnTsgRYVWj
Vcr0VtWMD7NE2ufZsG5Y
=Lx9L
-----END PGP SIGNATURE-----




More information about the cups-devel mailing list