debian/0000755000000000000000000000000012103033122007151 5ustar debian/libupnp6-dev.install0000644000000000000000000000010111650252502013057 0ustar usr/lib/*/*.a usr/lib/*/*.so usr/lib/*/pkgconfig/* usr/include/* debian/libupnp6-doc.lintian-overrides0000644000000000000000000000150211650536736015062 0ustar duplicate-files usr/share/doc/libupnp6-doc/html/gena__ctrlpt_8h__incl.map usr/share/doc/libupnp6-doc/html/gena__device_8h__incl.map duplicate-files usr/share/doc/libupnp6-doc/html/structscanner__t__coll__graph.map usr/share/doc/libupnp6-doc/html/structxml__alias__t__coll__graph.map duplicate-files usr/share/doc/libupnp6-doc/html/element_8c__incl.map usr/share/doc/libupnp6-doc/html/namedNodeMap_8c__incl.map usr/share/doc/libupnp6-doc/html/node_8c__incl.map duplicate-files usr/share/doc/libupnp6-doc/html/structFREELISTNODE__coll__graph.map usr/share/doc/libupnp6-doc/html/structLISTNODE__coll__graph.map usr/share/doc/libupnp6-doc/html/structSClientSubscription__coll__graph.map usr/share/doc/libupnp6-doc/html/struct__IXML__NamespaceURI__coll__graph.map usr/share/doc/libupnp6-doc/html/structvirtual__Dir__List__coll__graph.map debian/libupnp6-dev.dirs0000644000000000000000000000003111642706711012363 0ustar usr/lib usr/include/upnp debian/libupnp6.symbols0000644000000000000000000002502411706700136012343 0ustar libixml.so.2 libupnp6 #MINVER# ixmlAttr_free@Base 1.4.3 ixmlAttr_init@Base 1.4.3 ixmlCDATASection_free@Base 1.4.3 ixmlCDATASection_init@Base 1.4.3 ixmlCloneDOMString@Base 1.4.3 ixmlDocument_createAttribute@Base 1.4.3 ixmlDocument_createAttributeEx@Base 1.4.3 ixmlDocument_createAttributeNS@Base 1.4.3 ixmlDocument_createAttributeNSEx@Base 1.4.3 ixmlDocument_createCDATASection@Base 1.4.3 ixmlDocument_createCDATASectionEx@Base 1.4.3 ixmlDocument_createDocument@Base 1.4.3 ixmlDocument_createDocumentEx@Base 1.4.3 ixmlDocument_createElement@Base 1.4.3 ixmlDocument_createElementEx@Base 1.4.3 ixmlDocument_createElementNS@Base 1.4.3 ixmlDocument_createElementNSEx@Base 1.4.3 ixmlDocument_createTextNode@Base 1.4.3 ixmlDocument_createTextNodeEx@Base 1.4.3 ixmlDocument_free@Base 1.4.3 ixmlDocument_getElementById@Base 1.4.3 ixmlDocument_getElementsByTagName@Base 1.4.3 ixmlDocument_getElementsByTagNameNS@Base 1.4.3 ixmlDocument_importNode@Base 1.4.3 ixmlDocument_init@Base 1.4.3 #MISSING: 1:1.6.13# ixmlDocument_setOwnerDocument@Base 1.4.3 ixmlDocumenttoString@Base 1.4.3 #MISSING: 1:1.6.13# ixmlDomTreetoString@Base 1.4.3 #MISSING: 1:1.6.13# ixmlElement_findAttributeNode@Base 1.4.3 ixmlElement_free@Base 1.4.3 ixmlElement_getAttribute@Base 1.4.3 ixmlElement_getAttributeNS@Base 1.4.3 ixmlElement_getAttributeNode@Base 1.4.3 ixmlElement_getAttributeNodeNS@Base 1.4.3 ixmlElement_getElementsByTagName@Base 1.4.3 ixmlElement_getElementsByTagNameNS@Base 1.4.3 ixmlElement_getTagName@Base 1.4.3 ixmlElement_hasAttribute@Base 1.4.3 ixmlElement_hasAttributeNS@Base 1.4.3 ixmlElement_init@Base 1.4.3 ixmlElement_removeAttribute@Base 1.4.3 ixmlElement_removeAttributeNS@Base 1.4.3 ixmlElement_removeAttributeNode@Base 1.4.3 ixmlElement_setAttribute@Base 1.4.3 ixmlElement_setAttributeNS@Base 1.4.3 ixmlElement_setAttributeNode@Base 1.4.3 ixmlElement_setAttributeNodeNS@Base 1.4.3 ixmlElement_setTagName@Base 1.4.3 ixmlFreeDOMString@Base 1.4.3 ixmlLoadDocument@Base 1.4.3 ixmlLoadDocumentEx@Base 1.4.3 ixmlNamedNodeMap_addToNamedNodeMap@Base 1.4.3 ixmlNamedNodeMap_free@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNamedNodeMap_getItemNumber@Base 1.4.3 ixmlNamedNodeMap_getLength@Base 1.4.3 ixmlNamedNodeMap_getNamedItem@Base 1.4.3 ixmlNamedNodeMap_init@Base 1.4.3 ixmlNamedNodeMap_item@Base 1.4.3 ixmlNodeList_addToNodeList@Base 1.4.3 ixmlNodeList_free@Base 1.4.3 ixmlNodeList_init@Base 1.4.3 ixmlNodeList_item@Base 1.4.3 ixmlNodeList_length@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_allowChildren@Base 1.4.3 ixmlNode_appendChild@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneAttr@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneAttrDirect@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneCDATASect@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneDoc@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneElement@Base 1.4.3 ixmlNode_cloneNode@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneNodeTree@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneNodeTreeRecursive@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_cloneTextNode@Base 1.4.3 ixmlNode_compare@Base 1.4.3 ixmlNode_free@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_freeSingleNode@Base 1.4.3 ixmlNode_getAttributes@Base 1.4.3 ixmlNode_getChildNodes@Base 1.4.3 ixmlNode_getElementsByTagName@Base 1.4.3 ixmlNode_getElementsByTagNameNS@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_getElementsByTagNameNSRecursive@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_getElementsByTagNameRecursive@Base 1.4.3 ixmlNode_getFirstChild@Base 1.4.3 ixmlNode_getLastChild@Base 1.4.3 ixmlNode_getLocalName@Base 1.4.3 ixmlNode_getNamespaceURI@Base 1.4.3 ixmlNode_getNextSibling@Base 1.4.3 ixmlNode_getNodeName@Base 1.4.3 ixmlNode_getNodeType@Base 1.4.3 ixmlNode_getNodeValue@Base 1.4.3 ixmlNode_getOwnerDocument@Base 1.4.3 ixmlNode_getParentNode@Base 1.4.3 ixmlNode_getPrefix@Base 1.4.3 ixmlNode_getPreviousSibling@Base 1.4.3 ixmlNode_hasAttributes@Base 1.4.3 ixmlNode_hasChildNodes@Base 1.4.3 ixmlNode_init@Base 1.4.3 ixmlNode_insertBefore@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_isAncestor@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_isParent@Base 1.4.3 ixmlNode_removeChild@Base 1.4.3 ixmlNode_replaceChild@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_setLocalName@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_setNamespaceURI@Base 1.4.3 ixmlNode_setNodeName@Base 1.4.3 ixmlNode_setNodeProperties@Base 1.4.3 ixmlNode_setNodeValue@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_setPrefix@Base 1.4.3 #MISSING: 1:1.6.13# ixmlNode_setSiblingNodesParent@Base 1.4.3 ixmlNodetoString@Base 1.4.3 ixmlParseBuffer@Base 1.4.3 ixmlParseBufferEx@Base 1.4.3 ixmlPrintDocument@Base 1.4.3 #MISSING: 1:1.6.13# ixmlPrintDomTree@Base 1.4.3 #MISSING: 1:1.6.13# ixmlPrintDomTreeRecursive@Base 1.4.3 ixmlPrintNode@Base 1.4.3 ixmlRelaxParser@Base 1.4.3 ixml_membuf_append@Base 1.4.3 ixml_membuf_append_str@Base 1.4.3 ixml_membuf_assign@Base 1.4.3 ixml_membuf_assign_str@Base 1.4.3 ixml_membuf_destroy@Base 1.4.3 ixml_membuf_init@Base 1.4.3 ixml_membuf_insert@Base 1.4.3 libthreadutil.so.6 libupnp6 #MINVER# FreeListAlloc@Base 1.4.3 FreeListDestroy@Base 1.4.3 FreeListFree@Base 1.4.3 FreeListInit@Base 1.4.3 ListAddAfter@Base 1.4.3 ListAddBefore@Base 1.4.3 ListAddHead@Base 1.4.3 ListAddTail@Base 1.4.3 ListDelNode@Base 1.4.3 ListDestroy@Base 1.4.3 ListFind@Base 1.4.3 ListHead@Base 1.4.3 ListInit@Base 1.4.3 ListNext@Base 1.4.3 ListPrev@Base 1.4.3 ListSize@Base 1.4.3 ListTail@Base 1.4.3 TPAttrInit@Base 1.4.3 TPAttrSetIdleTime@Base 1.4.3 TPAttrSetJobsPerThread@Base 1.4.3 TPAttrSetMaxJobsTotal@Base 1.4.3 TPAttrSetMaxThreads@Base 1.4.3 TPAttrSetMinThreads@Base 1.4.3 TPAttrSetSchedPolicy@Base 1.4.3 TPAttrSetStackSize@Base 1:1.6.13 TPAttrSetStarvationTime@Base 1.4.3 TPJobInit@Base 1.4.3 TPJobSetFreeFunction@Base 1.4.3 TPJobSetPriority@Base 1.4.3 ThreadPoolAdd@Base 1.4.3 ThreadPoolAddPersistent@Base 1.4.3 ThreadPoolGetAttr@Base 1.4.3 ThreadPoolGetStats@Base 1.4.3 ThreadPoolInit@Base 1.4.3 ThreadPoolPrintStats@Base 1.4.3 ThreadPoolRemove@Base 1.4.3 ThreadPoolSetAttr@Base 1.4.3 ThreadPoolShutdown@Base 1.4.3 TimerThreadInit@Base 1.4.3 TimerThreadRemove@Base 1.4.3 TimerThreadSchedule@Base 1.4.3 TimerThreadShutdown@Base 1.4.3 #MISSING: 1.6.5# iasnprintf@Base 1.4.3 #MISSING: 1.6.5# iasnprintfFree@Base 1.4.3 libupnp.so.6 libupnp6 #MINVER# UpnpAcceptSubscription@Base 1.4.3 UpnpAcceptSubscriptionExt@Base 1.4.3 UpnpAddToAction@Base 1.4.3 UpnpAddToActionResponse@Base 1.4.3 UpnpAddToPropertySet@Base 1.4.3 UpnpAddVirtualDir@Base 1.4.3 UpnpCancelHttpGet@Base 1.4.3 UpnpClientSubscription_assign@Base 1:1.6.13 UpnpClientSubscription_delete@Base 1:1.6.13 UpnpClientSubscription_dup@Base 1:1.6.13 UpnpClientSubscription_get_ActualSID@Base 1:1.6.13 UpnpClientSubscription_get_ActualSID_cstr@Base 1:1.6.13 UpnpClientSubscription_get_EventURL@Base 1:1.6.13 UpnpClientSubscription_get_EventURL_cstr@Base 1:1.6.13 UpnpClientSubscription_get_Next@Base 1:1.6.13 UpnpClientSubscription_get_RenewEventId@Base 1:1.6.13 UpnpClientSubscription_get_SID@Base 1:1.6.13 UpnpClientSubscription_get_SID_cstr@Base 1:1.6.13 UpnpClientSubscription_new@Base 1:1.6.13 UpnpClientSubscription_set_ActualSID@Base 1:1.6.13 UpnpClientSubscription_set_EventURL@Base 1:1.6.13 UpnpClientSubscription_set_Next@Base 1:1.6.13 UpnpClientSubscription_set_RenewEventId@Base 1:1.6.13 UpnpClientSubscription_set_SID@Base 1:1.6.13 UpnpClientSubscription_strcpy_ActualSID@Base 1:1.6.13 UpnpClientSubscription_strcpy_EventURL@Base 1:1.6.13 UpnpClientSubscription_strcpy_SID@Base 1:1.6.13 UpnpCloseHttpGet@Base 1.4.3 UpnpCloseHttpPost@Base 1.4.3 UpnpCloseLog@Base 1:1.6.6 UpnpCreatePropertySet@Base 1.4.3 UpnpDisplayFileAndLine@Base 1:1.6.6 UpnpDownloadUrlItem@Base 1.4.3 UpnpDownloadXmlDoc@Base 1.4.3 UpnpEnableWebserver@Base 1.4.3 UpnpFinish@Base 1.4.3 #MISSING: 1:1.6.13# UpnpFree@Base 1.4.3 #MISSING: 1:1.6.6# UpnpFreeActionCompleteEvent@Base 1.6.5 #MISSING: 1:1.6.6# UpnpFreeSubscribeEvent@Base 1.6.5 UpnpGetDebugFile@Base 1:1.6.6 UpnpGetErrorMessage@Base 1.4.3 UpnpGetIfInfo@Base 1:1.6.13 UpnpGetServerIp6Address@Base 1:1.6.13 UpnpGetServerIpAddress@Base 1.4.3 UpnpGetServerPort@Base 1.4.3 UpnpGetServerUlaGuaIp6Address@Base 1:1.6.13 UpnpGetServiceVarStatus@Base 1.4.3 UpnpGetServiceVarStatusAsync@Base 1.4.3 UpnpHttpGetProgress@Base 1.4.3 UpnpInit@Base 1.4.3 UpnpInitLog@Base 1:1.6.6 UpnpIsWebserverEnabled@Base 1.4.3 UpnpMakeAction@Base 1.4.3 UpnpMakeActionResponse@Base 1.4.3 UpnpNotify@Base 1.4.3 UpnpNotifyExt@Base 1.4.3 UpnpOpenHttpGet@Base 1.4.3 UpnpOpenHttpGetEx@Base 1.4.3 UpnpOpenHttpGetProxy@Base 1.4.3 UpnpOpenHttpPost@Base 1.4.3 UpnpPrintf@Base 1:1.6.6 UpnpReadHttpGet@Base 1.4.3 UpnpRegisterClient@Base 1.4.3 UpnpRegisterRootDevice2@Base 1.4.3 UpnpRegisterRootDevice3@Base 1:1.6.13 UpnpRegisterRootDevice4@Base 1:1.6.13 UpnpRegisterRootDevice@Base 1.4.3 UpnpRemoveAllVirtualDirs@Base 1.4.3 UpnpRemoveVirtualDir@Base 1.4.3 UpnpRenewSubscription@Base 1.4.3 UpnpRenewSubscriptionAsync@Base 1.4.3 UpnpResolveURL2@Base 1:1.6.13 UpnpResolveURL@Base 1.4.3 UpnpSdkClientRegistered@Base 1.4.3 #MISSING: 1:1.6.13# UpnpSdkDeviceRegistered@Base 1.4.3 UpnpSdkDeviceRegisteredV4@Base 1:1.6.13 UpnpSdkDeviceregisteredV6@Base 1:1.6.13 UpnpSdkInit@Base 1.4.3 UpnpSearchAsync@Base 1.4.3 UpnpSendAction@Base 1.4.3 UpnpSendActionAsync@Base 1.4.3 UpnpSendActionEx@Base 1.4.3 UpnpSendActionExAsync@Base 1.4.3 UpnpSendAdvertisement@Base 1.4.3 UpnpSendAdvertisementLowPower@Base 1:1.6.14 UpnpSetContentLength@Base 1.4.3 UpnpSetLogFileNames@Base 1:1.6.6 UpnpSetLogLevel@Base 1:1.6.6 UpnpSetMaxContentLength@Base 1.4.3 UpnpSetMaxSubscriptionTimeOut@Base 1.4.3 UpnpSetMaxSubscriptions@Base 1.4.3 UpnpSetVirtualDirCallbacks@Base 1.4.3 UpnpSetWebServerRootDir@Base 1.4.3 UpnpString_assign@Base 1:1.6.13 UpnpString_casecmp@Base 1:1.6.13 UpnpString_clear@Base 1:1.6.13 UpnpString_cmp@Base 1:1.6.13 UpnpString_delete@Base 1:1.6.13 UpnpString_dup@Base 1:1.6.13 UpnpString_get_Length@Base 1:1.6.13 UpnpString_get_String@Base 1:1.6.13 UpnpString_new@Base 1:1.6.13 UpnpString_set_Length@Base 1:1.6.13 UpnpString_set_String@Base 1:1.6.13 UpnpString_set_StringN@Base 1:1.6.13 UpnpSubscribe@Base 1.4.3 UpnpSubscribeAsync@Base 1.4.3 UpnpThreadDistribution@Base 1.4.3 UpnpUnRegisterClient@Base 1.4.3 UpnpUnRegisterRootDevice@Base 1.4.3 UpnpUnRegisterRootDeviceLowPower@Base 1:1.6.14 UpnpUnSubscribe@Base 1.4.3 UpnpUnSubscribeAsync@Base 1.4.3 UpnpVirtualDir_set_CloseCallback@Base 1:1.6.13 UpnpVirtualDir_set_GetInfoCallback@Base 1:1.6.13 UpnpVirtualDir_set_OpenCallback@Base 1:1.6.13 UpnpVirtualDir_set_ReadCallback@Base 1:1.6.13 UpnpVirtualDir_set_SeekCallback@Base 1:1.6.13 UpnpVirtualDir_set_WriteCallback@Base 1:1.6.13 UpnpWriteHttpPost@Base 1.4.3 debian/changelog0000644000000000000000000001627412103025756011053 0ustar libupnp (1:1.6.17-1.2) unstable; urgency=high * Non-maintainer upload by the Security Team. * debian/patches/0001-Security-fix-for-CERT-issue-VU-922681 added, fix various stack-based buffer overflows in service_unique_name() function. This fix CVE-2012-5958, CVE-2012-5959, CVE-2012-5960, CVE-2012-5961, CVE-2012-5962, CVE-2012-5963, CVE-2012-5964, CVE-2012-5965. closes: #699316 -- Yves-Alexis Perez Fri, 01 Feb 2013 21:56:12 +0100 libupnp (1:1.6.17-1.1) unstable; urgency=high * Non-maintainer upload. * libupnp6-doc Replaces libupnp3-dev (closes: #670894) -- Julien Cristau Tue, 08 May 2012 16:59:14 +0200 libupnp (1:1.6.17-1) unstable; urgency=low * Ack NMU, thankyou for your work on this package. * New upstream release, rename to libupnp6 for upstream's soname bump. (LP: #855339, LP: #648506). Now includes IPv6 support. * Update from upstream git to get reinstated UpnpSetVirtualDirCallbacks API. * Remove all patches that are now in upstream. * Update remaining patches (01,07,12) for new upstream coding standards. * Remove fixed-length URLs from upnpapi (patch 18, Closes: #353169). * Update to debhelper v9 to get multi-arch and build-hardening in dh. * Update to Policy 3.9.3, and note that we are "discouraged" from shipping three libraries in this package but live with it for now. * Convert to multiarch. * libupnp-dev metapackage is now Arch: all. * Override lintian about versioned Conflicts and dupe files in docs. * Update debian/copyright to DEP-5 v1.0. * Generate up-to-date docs for the current API and ship a -doc package. -- Nick Leverton Sat, 14 Apr 2012 20:58:59 +0100 libupnp (1:1.6.6-5.1) unstable; urgency=low * Non-maintainer upload. * Don't ship .la files (Closes: #622520). -- Luk Claes Sat, 25 Jun 2011 20:01:57 +0200 libupnp (1:1.6.6-5) unstable; urgency=low * Fixes to BSD build issues (Closes: #573319, FTBFS on Gnu/kFreeBSD) * We no longer Build-Depend on dbs anyway (Closes: #576068) * More debug tidying (07-neaten-debug.patch): - send UPNP_CRITICAL msgs to the info log as well as to the error log. - don't print HTTP headers to stdout as they're already in logfile. * Always compile in logging code but don't log unless requested (12-debian-always-debug.patch) to help porting other apps. * Cherry-pick some upstream bug fixes: - soap_request_and_response http_request parameter error from r486 - "reuseaddr" patch from issue 2995758 backported from r548 - threadpool hang when busy from r515 - memory leak in SSDP AdvertiseAndReply from issue 2392304, r518 * Add $PTHREAD_CFLAGS to libupnp.pc as assumed by {acx,ax}_pthread.m4 (patch 16, Closes: #555386). -- Nick Leverton Fri, 14 May 2010 15:47:17 +0100 libupnp (1:1.6.6-4) unstable; urgency=low * New patch 03-fix-duplicate-entries: fix FTBFS by removing duplicates from file list; patch by Stefan Potyra (Closes: #572859) * Update Sections (Closes: #519926) and general Policy to 3.8.4 * Use debhelper 7 dh instead of dbs * Generate and update symbols file * Allow to co-exist with latest libupnp4. * Patch 06-patch-statevar-query.patch adapted from upstream 1.8 branch to fix format of State Variable Query response. * Fix sending of incorrect timeout on auto renew (patch 10). -- Nick Leverton Mon, 08 Mar 2010 18:23:14 +0000 libupnp (1:1.6.6-3) unstable; urgency=high [ Dmitry E. Oboukhov ] * Added libupnp-dev with depends to libupnp3-dev, really closes: #490339, #490533. [ Nick Leverton ] * Include GNU/kfreeBSD build patch (Closes: #491173) -- Nick Leverton Mon, 21 Jul 2008 20:57:42 +0100 libupnp (1:1.6.6-2) unstable; urgency=low * Bump epoch and add Conflicts with libupnp4, to displace incorrect upload of libupnp4 which displaced this package. Closes: #490339 * Fix the erroneous bug 426833 reference in old changelog, don't just document that it was wrong. Closes: #490536 * Standards-Version bumped to 3.8.0, compat bumped to 7. -- Nick Leverton Sun, 13 Jul 2008 10:39:17 +0100 libupnp (1.6.6-1) unstable; urgency=low * New upstream release * Remove patch 03-upstream-upnp-rootdevice.patch, now in upstream. * Remove buggy patch 02-debian-fixed-length-buffer-for-urls.patch (Closes: #482737, reopens #353169). libupnp4 will include upstream's wider changes for ridding the library of fixed-length static buffers. * Update watchfile again for better uscan pattern matching * Build -dbg symbol package anyway; allow pupnp "--enable-debug" via DEB_BUILD_OPTIONS="debug" * Update copyright file to reflect all contributors. * Tidy up build to use dh_install. -- Nick Leverton Thu, 19 Jun 2008 18:27:11 +0100 libupnp (1.6.5-2) unstable; urgency=low * Correct New Maintainer bug number (was given as #426833, should be #462833) (really Closes: #462833). * Replace RSA Inc copyright MD5 functions by public domain implementation (Closes: #459516). * Remove Build-dep on doc++ as upstream now ships documentation in tarball (Closes: #307562). * Dynamically allocated buffer for uPnP Action urls (Closes: #353169). * Update Description to match current fork of upstream. * Fix watchfile to omit libupnp-doc tarballs. * No longer ignore "upnp:rootdevice" advertisement, upstream svn r326 (03-upstream-upnp-rootdevice.patch). -- Nick Leverton Mon, 21 Apr 2008 22:20:53 +0100 libupnp (1.6.5-1) unstable; urgency=low * New upstream release (Closes: #426388, #439373) * New maintainer (Closes: #462833) * Upstream soname changed, bump package to libupnp3 * Make libupnp-dev depend on matching version of libupnp3 -- Nick Leverton Sun, 24 Feb 2008 10:29:48 +0000 libupnp (1.4.3-2) unstable; urgency=low * Make libupnp-dev depend on libupnp2. -- Steve McIntyre <93sam@debian.org> Sat, 28 Apr 2007 16:58:23 +0100 libupnp (1.4.3-1) unstable; urgency=low * New upstream release from pupnp fork (Closes: #392783, #400903, #320949). * Do not claim libupnp-dev contains debugging symbols (Closes: #350115). * Update to Standards-Version 3.7.2. * Remove unnecessary ${shlibs:Depends} from libupnp-dev's Depends field. * Thanks to Jeremy Laine for help on this release. * Two kFreeBSD build failures reported should now be fixed. Closes: #416254. Please open more bugs if there are any more failures. -- Steve McIntyre <93sam@debian.org> Sat, 31 Mar 2007 16:03:29 +0200 libupnp (1.2.1-3) unstable; urgency=low * Fix multiple compiler warnings fixes with gcc4. Thanks to Oskar Liljeblad for a patch. Closes: #320949 * Include debug versions of the libraries in the -dev package. Closes: #350115 * Updated Standards-version. -- Steve McIntyre <93sam@debian.org> Sun, 12 Feb 2006 20:55:35 +0000 libupnp (1.2.1-2) unstable; urgency=low * Fix FTBFS with gcc4. Thanks to Andreas Jochens for the patch. Closes: #301775 -- Steve McIntyre <93sam@debian.org> Sun, 17 Jul 2005 20:23:44 +0300 libupnp (1.2.1-1) unstable; urgency=low * Initial version -- Steve McIntyre <93sam@debian.org> Tue, 18 Jan 2005 19:42:08 +0000 debian/compat0000644000000000000000000000000211643057020010362 0ustar 9 debian/patches/0000755000000000000000000000000012103032701010602 5ustar debian/patches/series0000644000000000000000000000027012102776427012041 0ustar 01-debian-md5-licence.patch 07-neaten-debug.patch 09-update-doc.patch 12-debian-always-debug.patch 18-url-upnpstrings.patch 0001-Security-fix-for-CERT-issue-VU-922681.branch-1.6.patch debian/patches/12-debian-always-debug.patch0000644000000000000000000000135611643054004015664 0ustar Description: Don't write debug files by default if debug is compiled in. Author: Nick Leverton Index: libupnp-1.6.13/upnp/src/api/upnpdebug.c =================================================================== --- libupnp-1.6.13.orig/upnp/src/api/upnpdebug.c 2011-10-05 13:56:09.000000000 +0100 +++ libupnp-1.6.13/upnp/src/api/upnpdebug.c 2011-10-05 14:13:27.000000000 +0100 @@ -61,10 +61,10 @@ static FILE *InfoFileHnd = NULL; /*! Name of the error file */ -static const char *errFileName = strdup("IUpnpErrFile.txt"); +static const char *errFileName = NULL; /*! Name of the info file */ -static const char *infoFileName = strdup("IUpnpInfoFile.txt"); +static const char *infoFileName = NULL; int UpnpInitLog(void) { debian/patches/09-update-doc.patch0000644000000000000000000000521311650240073014110 0ustar Description: Mung the upstream Doxyfile to generate meaningful documentation for Debian Author: Nick Leverton Index: libupnp4-1.8.0~svn20111020/Doxyfile =================================================================== --- libupnp4-1.8.0~svn20111020.orig/Doxyfile 2011-10-20 23:27:52.000000000 +0100 +++ libupnp4-1.8.0~svn20111020/Doxyfile 2011-10-21 10:44:47.000000000 +0100 @@ -409,7 +409,7 @@ # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank @@ -421,14 +421,14 @@ # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. -WARN_IF_UNDOCUMENTED = YES +WARN_IF_UNDOCUMENTED = NO # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. -WARN_IF_DOC_ERROR = YES +WARN_IF_DOC_ERROR = NO # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters @@ -603,7 +603,7 @@ # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. -REFERENCES_LINK_SOURCE = YES +REFERENCES_LINK_SOURCE = NO # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen @@ -761,7 +761,7 @@ # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be @@ -1029,7 +1029,7 @@ # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = DEBUG UPNP_HAVE_TOOLS INCLUDE_DEVICE_APIS INCLUDE_CLIENT_APIS EXCLUDE_GENA=0 EXCLUDE_DOM=0 +PREDEFINED = DEBUG UPNP_HAVE_TOOLS INCLUDE_DEVICE_APIS INCLUDE_CLIENT_APIS EXCLUDE_GENA=0 EXCLUDE_DOM=0 EXPORT_SPEC= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. debian/patches/07-neaten-debug.patch0000644000000000000000000005465411731220056014433 0ustar Description: Neaten debugging so it's safe to leave it compiled in: * Don't keep pointers to passed-in filenames, they might have been temporaries. * Replace some anonymous comparisons by the appropriate enum name. * Replace big file+line banner by a line-based format including timestamp, and add/remove newlines or white space where appropriate. * Comment out the noisy "Adding a string" prints from the debug. * Remove print_http_headers() which wrote to stdout, they are already logged via UpnpPrintf from everywhere that called print_http_headers(). Author: Nick Leverton Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/api/upnpdebug.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/api/upnpdebug.c 2012-01-24 23:35:34.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/api/upnpdebug.c 2012-03-17 23:35:48.000000000 +0000 @@ -40,6 +40,7 @@ #include "upnp.h" #include "upnpdebug.h" +#include #include #include #include @@ -60,19 +61,19 @@ static FILE *InfoFileHnd = NULL; /*! Name of the error file */ -static const char *errFileName = "IUpnpErrFile.txt"; +static const char *errFileName = strdup("IUpnpErrFile.txt"); /*! Name of the info file */ -static const char *infoFileName = "IUpnpInfoFile.txt"; +static const char *infoFileName = strdup("IUpnpInfoFile.txt"); int UpnpInitLog(void) { ithread_mutex_init(&GlobalDebugMutex, NULL); if (DEBUG_TARGET == 1) { - if ((ErrFileHnd = fopen(errFileName, "a")) == NULL) { + if ( errFileName && *errFileName && (ErrFileHnd = fopen(errFileName, "a")) == NULL) { return -1; } - if ((InfoFileHnd = fopen(infoFileName, "a")) == NULL) { + if (infoFileName && *infoFileName && (InfoFileHnd = fopen(infoFileName, "a")) == NULL) { return -1; } } @@ -87,21 +88,33 @@ void UpnpCloseLog(void) { if (DEBUG_TARGET == 1) { - fflush(ErrFileHnd); - fflush(InfoFileHnd); - fclose(ErrFileHnd); - fclose(InfoFileHnd); + if (ErrFileHnd) { + fflush(ErrFileHnd); + fclose(ErrFileHnd); + } + if (InfoFileHnd) { + fflush(InfoFileHnd); + fclose(InfoFileHnd); + } } ithread_mutex_destroy(&GlobalDebugMutex); } void UpnpSetLogFileNames(const char *ErrFileName, const char *InfoFileName) { + if (errFileName) { + free((void*)errFileName); + errFileName = NULL; + } if (ErrFileName) { - errFileName = ErrFileName; + errFileName = strdup(ErrFileName); + } + if (infoFileName) { + free((void*)infoFileName); + infoFileName = NULL; } if (InfoFileName) { - infoFileName = InfoFileName; + infoFileName = strdup(InfoFileName); } } @@ -136,24 +149,29 @@ UpnpDisplayFileAndLine(stdout, DbgFileName, DbgLineNo); vfprintf(stdout, FmtStr, ArgList); fflush(stdout); - } else if (DLevel == 0) { - if (DbgFileName) - UpnpDisplayFileAndLine(ErrFileHnd, DbgFileName, - DbgLineNo); - vfprintf(ErrFileHnd, FmtStr, ArgList); - fflush(ErrFileHnd); } else { - if (DbgFileName) - UpnpDisplayFileAndLine(InfoFileHnd, DbgFileName, - DbgLineNo); - vfprintf(InfoFileHnd, FmtStr, ArgList); - fflush(InfoFileHnd); + if (ErrFileHnd && DLevel == UPNP_CRITICAL) { + if (DbgFileName) { + UpnpDisplayFileAndLine(ErrFileHnd, DbgFileName, + DbgLineNo); + } + vfprintf(ErrFileHnd, FmtStr, ArgList); + fflush(ErrFileHnd); + } + if (InfoFileHnd) { + if (DbgFileName) { + UpnpDisplayFileAndLine(InfoFileHnd, DbgFileName, + DbgLineNo); + } + vfprintf(InfoFileHnd, FmtStr, ArgList); + fflush(InfoFileHnd); + } } va_end(ArgList); ithread_mutex_unlock(&GlobalDebugMutex); } -FILE *GetDebugFile(Upnp_LogLevel DLevel, Dbg_Module Module) +FILE *UpnpGetDebugFile(Upnp_LogLevel DLevel, Dbg_Module Module) { FILE *ret; @@ -161,7 +179,7 @@ ret = NULL; if (!DEBUG_TARGET) ret = stdout; - else if (DLevel == 0) + else if (DLevel == UPNP_CRITICAL) ret = ErrFileHnd; else ret = InfoFileHnd; @@ -171,78 +189,26 @@ void UpnpDisplayFileAndLine(FILE *fd, const char *DbgFileName, int DbgLineNo) { -#define NLINES 2 -#define MAX_LINE_SIZE 512 -#define NUMBER_OF_STARS 80 - const char *lines[NLINES]; - char buf[NLINES][MAX_LINE_SIZE]; - int i; - - /* Initialize the pointer array */ - for (i = 0; i < NLINES; i++) - lines[i] = buf[i]; - /* Put the debug lines in the buffer */ - sprintf(buf[0], "DEBUG - THREAD ID: 0x%lX", + time_t timenow = time(NULL); + struct tm localtimenow; + char timeprint[20]; /* "YYYY-MM-DD HH:MM:SS" */ + + localtime_r(&timenow, &localtimenow); + strftime(timeprint, sizeof(timeprint), "%F %T", &localtimenow); + fprintf(fd, "%s 0x%lX ", timeprint, #ifdef WIN32 (unsigned long int)ithread_self().p #else (unsigned long int)ithread_self() #endif ); - if (DbgFileName) - sprintf(buf[1], "FILE: %s, LINE: %d", DbgFileName, DbgLineNo); - /* Show the lines centered */ - UpnpDisplayBanner(fd, lines, NLINES, NUMBER_OF_STARS); + if (DbgFileName) { + char *filepath = strdup(DbgFileName); + fprintf(fd, "%s:%d ", basename(filepath), DbgLineNo); + free(filepath); + } fflush(fd); } -void UpnpDisplayBanner(FILE * fd, - const char **lines, size_t size, size_t starLength) -{ - size_t leftMarginLength = starLength / 2 + 1; - size_t rightMarginLength = starLength / 2 + 1; - size_t i = 0; - size_t LineSize = 0; - size_t starLengthMinus2 = starLength - 2; - - char *leftMargin = malloc(leftMarginLength); - char *rightMargin = malloc(rightMarginLength); - char *stars = malloc(starLength + 1); - char *currentLine = malloc(starLength + 1); - const char *line = NULL; - - memset(stars, '*', starLength); - stars[starLength] = 0; - memset(leftMargin, 0, leftMarginLength); - memset(rightMargin, 0, rightMarginLength); - fprintf(fd, "\n%s\n", stars); - for (i = 0; i < size; i++) { - LineSize = strlen(lines[i]); - line = lines[i]; - while (LineSize > starLengthMinus2) { - memcpy(currentLine, line, starLengthMinus2); - currentLine[starLengthMinus2] = 0; - fprintf(fd, "*%s*\n", currentLine); - LineSize -= starLengthMinus2; - line += starLengthMinus2; - } - leftMarginLength = (starLengthMinus2 - LineSize) / 2; - if (LineSize % 2 == 0) - rightMarginLength = leftMarginLength; - else - rightMarginLength = leftMarginLength + 1; - memset(leftMargin, ' ', leftMarginLength); - memset(rightMargin, ' ', rightMarginLength); - leftMargin[leftMarginLength] = 0; - rightMargin[rightMarginLength] = 0; - fprintf(fd, "*%s%s%s*\n", leftMargin, line, rightMargin); - } - fprintf(fd, "%s\n\n", stars); - - free(currentLine); - free(stars); - free(rightMargin); - free(leftMargin); -} #endif /* DEBUG */ Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/gena/gena_ctrlpt.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/gena/gena_ctrlpt.c 2012-03-17 00:27:05.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/gena/gena_ctrlpt.c 2012-03-17 23:35:48.000000000 +0000 @@ -79,12 +79,12 @@ UpnpString *tmpSID = UpnpString_new(); if (AUTO_RENEW_TIME == 0) { - UpnpPrintf( UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUB EXPIRED"); + UpnpPrintf( UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUB EXPIRED\n"); sub_struct->ErrCode = UPNP_E_SUCCESS; send_callback = 1; eventType = UPNP_EVENT_SUBSCRIPTION_EXPIRED; } else { - UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA AUTO RENEW"); + UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA AUTO RENEW\n"); timeout = sub_struct->TimeOut; UpnpString_set_String(tmpSID, sub_struct->Sid); errCode = genaRenewSubscription( @@ -108,7 +108,7 @@ free_upnp_timeout(event); goto end_function; } - UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "HANDLE IS VALID"); + UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "HANDLE IS VALID\n"); /* make callback */ callback_fun = handle_info->Callback; @@ -531,7 +531,7 @@ memset(temp_sid, 0, sizeof(temp_sid)); memset(temp_sid2, 0, sizeof(temp_sid2)); - UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUBSCRIBE BEGIN"); + UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "GENA SUBSCRIBE BEGIN\n"); UpnpString_clear(out_sid); @@ -639,7 +639,7 @@ free_upnp_timeout((upnp_timeout *)tempJob.arg); } - UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "REMOVED AUTO RENEW EVENT"); + UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, "REMOVED AUTO RENEW EVENT\n"); UpnpClientSubscription_set_RenewEventId(sub, -1); UpnpClientSubscription_assign(sub_copy, sub); Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/gena.h =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/inc/gena.h 2012-01-24 23:35:34.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/gena.h 2012-03-17 23:35:48.000000000 +0000 @@ -121,10 +121,10 @@ */ #define SubscribeLock() \ UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \ - "Trying Subscribe Lock"); \ + "Trying Subscribe Lock\n"); \ ithread_mutex_lock(&GlobalClientSubscribeMutex); \ UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \ - "Subscribe Lock"); + "Subscribe Lock\n"); /*! @@ -132,10 +132,10 @@ */ #define SubscribeUnlock() \ UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \ - "Trying Subscribe UnLock"); \ + "Trying Subscribe UnLock\n"); \ ithread_mutex_unlock(&GlobalClientSubscribeMutex); \ UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, \ - "Subscribe UnLock"); + "Subscribe UnLock\n"); /*! Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/upnpapi.h =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/inc/upnpapi.h 2012-03-17 00:27:05.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/upnpapi.h 2012-03-17 23:35:48.000000000 +0000 @@ -137,21 +137,21 @@ #define HandleWriteLock() \ - UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Trying a write lock"); \ + UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Trying a write lock\n"); \ ithread_rwlock_wrlock(&GlobalHndRWLock); \ - UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Write lock acquired"); + UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Write lock acquired\n"); #define HandleReadLock() \ - UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Trying a read lock"); \ + UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Trying a read lock\n"); \ ithread_rwlock_rdlock(&GlobalHndRWLock); \ - UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Read lock acquired"); + UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Read lock acquired\n"); #define HandleUnlock() \ - UpnpPrintf(UPNP_INFO, API,__FILE__, __LINE__, "Trying Unlock"); \ + UpnpPrintf(UPNP_INFO, API,__FILE__, __LINE__, "Trying Unlock\n"); \ ithread_rwlock_unlock(&GlobalHndRWLock); \ - UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Unlocked rwlock"); + UpnpPrintf(UPNP_INFO, API, __FILE__, __LINE__, "Unlocked rwlock\n"); /*! Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/gena/gena_device.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/gena/gena_device.c 2012-03-12 21:25:14.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/gena/gena_device.c 2012-03-17 23:35:48.000000000 +0000 @@ -474,7 +474,7 @@ memset(&job, 0, sizeof(job)); UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENA BEGIN INITIAL NOTIFY"); + "GENA BEGIN INITIAL NOTIFY\n"); reference_count = (int *)malloc(sizeof (int)); if (reference_count == NULL) { @@ -518,7 +518,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "FOUND SERVICE IN INIT NOTFY: UDN %s, ServID: %s", + "FOUND SERVICE IN INIT NOTFY: UDN %s, ServID: %s\n", UDN, servId); sub = GetSubscriptionSID(sid, service); @@ -528,7 +528,7 @@ goto ExitFunction; } UpnpPrintf( UPNP_INFO, GENA, __FILE__, __LINE__, - "FOUND SUBSCRIPTION IN INIT NOTIFY: SID %s", sid); + "FOUND SUBSCRIPTION IN INIT NOTIFY: SID %s\n", sid); sub->active = 1; if (var_count <= 0) { @@ -543,7 +543,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENERATED PROPERTY SET IN INIT NOTIFY: %s", + "GENERATED PROPERTY SET IN INIT NOTIFY: %s\n", propertySet); headers = AllocGenaHeaders(propertySet); @@ -601,7 +601,7 @@ HandleUnlock(); UpnpPrintf(UPNP_INFO, GENA, __FILE__, line, - "GENA END INITIAL NOTIFY, ret = %d", + "GENA END INITIAL NOTIFY, ret = %d\n", ret); return ret; @@ -633,7 +633,7 @@ memset(&job, 0, sizeof(job)); UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENA BEGIN INITIAL NOTIFY EXT"); + "GENA BEGIN INITIAL NOTIFY EXT\n"); reference_count = (int *)malloc(sizeof (int)); if (reference_count == NULL) { @@ -677,7 +677,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "FOUND SERVICE IN INIT NOTFY EXT: UDN %s, ServID: %s", + "FOUND SERVICE IN INIT NOTFY EXT: UDN %s, ServID: %s\n", UDN, servId); sub = GetSubscriptionSID(sid, service); @@ -687,7 +687,7 @@ goto ExitFunction; } UpnpPrintf( UPNP_INFO, GENA, __FILE__, __LINE__, - "FOUND SUBSCRIPTION IN INIT NOTIFY EXT: SID %s", sid); + "FOUND SUBSCRIPTION IN INIT NOTIFY EXT: SID %s\n", sid); sub->active = 1; if (PropSet == 0) { @@ -703,7 +703,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENERATED PROPERTY SET IN INIT EXT NOTIFY: %s", + "GENERATED PROPERTY SET IN INIT EXT NOTIFY: %s\n", propertySet); headers = AllocGenaHeaders(propertySet); @@ -761,7 +761,7 @@ HandleUnlock(); UpnpPrintf(UPNP_INFO, GENA, __FILE__, line, - "GENA END INITIAL NOTIFY EXT, ret = %d", + "GENA END INITIAL NOTIFY EXT, ret = %d\n", ret); return ret; @@ -792,7 +792,7 @@ memset(&job, 0, sizeof(job)); UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENA BEGIN NOTIFY ALL EXT"); + "GENA BEGIN NOTIFY ALL EXT\n"); reference_count = (int *)malloc(sizeof (int)); if (reference_count == NULL) { @@ -828,7 +828,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENERATED PROPERTY SET IN EXT NOTIFY: %s", + "GENERATED PROPERTY SET IN EXT NOTIFY: %s\n", propertySet); headers = AllocGenaHeaders(propertySet); @@ -905,7 +905,7 @@ HandleUnlock(); UpnpPrintf(UPNP_INFO, GENA, __FILE__, line, - "GENA END NOTIFY ALL EXT, ret = %d", + "GENA END NOTIFY ALL EXT, ret = %d\n", ret); return ret; @@ -938,7 +938,7 @@ memset(&job, 0, sizeof(job)); UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENA BEGIN NOTIFY ALL"); + "GENA BEGIN NOTIFY ALL\n"); reference_count = (int *)malloc(sizeof (int)); if (reference_count == NULL) { @@ -973,7 +973,7 @@ goto ExitFunction; } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "GENERATED PROPERTY SET IN EXT NOTIFY: %s", + "GENERATED PROPERTY SET IN EXT NOTIFY: %s\n", propertySet); headers = AllocGenaHeaders(propertySet); @@ -1051,7 +1051,7 @@ HandleUnlock(); UpnpPrintf(UPNP_INFO, GENA, __FILE__, line, - "GENA END NOTIFY ALL, ret = %d", + "GENA END NOTIFY ALL, ret = %d\n", ret); return ret; @@ -1282,7 +1282,7 @@ } UpnpPrintf(UPNP_INFO, GENA, __FILE__, __LINE__, - "Subscription Request: Number of Subscriptions already %d\n " + "Subscription Request: Number of subscriptions already: %d, " "Max Subscriptions allowed: %d\n", service->TotalSubscriptions, handle_info->MaxSubscriptions); @@ -1457,7 +1457,7 @@ } UpnpPrintf( UPNP_INFO, GENA, __FILE__, __LINE__, - "Renew request: Number of subscriptions already: %d\n " + "Renew request: Number of subscriptions already: %d, " "Max Subscriptions allowed:%d\n", service->TotalSubscriptions, handle_info->MaxSubscriptions ); Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/soap/soap_device.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/soap/soap_device.c 2012-03-10 17:07:23.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/soap/soap_device.c 2012-03-17 23:35:48.000000000 +0000 @@ -295,7 +295,7 @@ IXML_NodeList *nl = NULL; UpnpPrintf(UPNP_INFO, SOAP, __FILE__, __LINE__, - "get_action_node(): node name =%s\n ", NodeName); + "get_action_node(): node name =%s\n", NodeName); *RespNode = NULL; /* Got the Envelope node here */ EnvpNode = ixmlNode_getFirstChild((IXML_Node *) TempDoc); Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/httpreadwrite.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/genlib/net/http/httpreadwrite.c 2012-03-17 00:27:17.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/httpreadwrite.c 2012-03-17 23:36:54.000000000 +0000 @@ -299,7 +299,6 @@ UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__, "<<< (RECVD) <<<\n%s\n-----------------\n", parser->msg.msg.buf ); - print_http_headers( &parser->msg ); if (g_maxContentLength > (size_t)0 && parser->content_length > (unsigned int)g_maxContentLength) { *http_error_code = HTTP_REQ_ENTITY_TOO_LARGE; line = __LINE__; @@ -331,7 +330,6 @@ UpnpPrintf( UPNP_INFO, HTTP, __FILE__, __LINE__, "<<< (RECVD) <<<\n%s\n-----------------\n", parser->msg.msg.buf ); - print_http_headers(&parser->msg); line = __LINE__; ret = 0; goto ExitFunction; @@ -696,7 +694,6 @@ return ret_code; } UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__, "Response\n"); - print_http_headers(&response.msg); /* optional content-type */ if (content_type) { if (httpmsg_find_hdr(&response.msg, HDR_CONTENT_TYPE, &ctype) == @@ -1641,8 +1638,8 @@ /* C string */ s = (char *)va_arg(argp, char *); assert(s); - UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__, - "Adding a string : %s\n", s); + /* UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__, + "Adding a string : %s\n", s); */ if (membuffer_append(buf, s, strlen(s))) goto error_handler; } else if (c == 'K') { @@ -1663,8 +1660,8 @@ } else if (c == 'b') { /* mem buffer */ s = (char *)va_arg(argp, char *); - UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__, - "Adding a char Buffer starting with: %c\n", (int)s[0]); + /* UpnpPrintf(UPNP_ALL, HTTP, __FILE__, __LINE__, + "Adding a char Buffer starting with: %c\n", (int)s[0]); */ assert(s); length = (size_t) va_arg(argp, size_t); if (membuffer_append(buf, s, length)) Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/webserver.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/genlib/net/http/webserver.c 2012-03-12 22:08:56.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/webserver.c 2012-03-17 23:35:48.000000000 +0000 @@ -1033,7 +1033,6 @@ size_t dummy; const char *extra_headers = NULL; - print_http_headers(req); url = &req->uri; assert(req->method == HTTPMETHOD_GET || req->method == HTTPMETHOD_HEAD || @@ -1403,7 +1402,6 @@ UpnpPrintf(UPNP_INFO, HTTP, __FILE__, __LINE__, "<<< (RECVD) <<<\n%s\n-----------------\n", parser->msg.msg.buf); - print_http_headers(&parser->msg); parser->position = POS_COMPLETE; } else { /* partial msg or response */ Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/ssdp/ssdp_server.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/ssdp/ssdp_server.c 2012-03-17 00:27:17.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/ssdp/ssdp_server.c 2012-03-17 23:35:48.000000000 +0000 @@ -132,12 +132,12 @@ NumCopy++; for (i = 0lu;; i++) { UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, - "Entering new device list with i = %lu\n\n", + "Entering new device list with i = %lu\n", i); tmpNode = ixmlNodeList_item(SInfo->DeviceList, i); if (!tmpNode) { UpnpPrintf(UPNP_ALL, API, __FILE__, __LINE__, - "Exiting new device list with i = %lu\n\n", + "Exiting new device list with i = %lu\n", i); break; } Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/httpparser.c =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/genlib/net/http/httpparser.c 2012-03-17 00:27:17.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/genlib/net/http/httpparser.c 2012-03-17 23:35:48.000000000 +0000 @@ -2175,37 +2175,3 @@ } -#ifdef DEBUG -void print_http_headers(http_message_t *hmsg) -{ - ListNode *node; - /* NNS: dlist_node *node; */ - http_header_t *header; - - /* print start line */ - if( hmsg->is_request ) { - printf( "method = %d, version = %d.%d, url = %.*s\n", - hmsg->method, hmsg->major_version, hmsg->minor_version, - (int)hmsg->uri.pathquery.size, hmsg->uri.pathquery.buff); - } else { - printf( "resp status = %d, version = %d.%d, status msg = %.*s\n", - hmsg->status_code, hmsg->major_version, hmsg->minor_version, - (int)hmsg->status_msg.length, hmsg->status_msg.buf); - } - - /* print headers */ - node = ListHead( &hmsg->headers ); - /* NNS: node = dlist_first_node( &hmsg->headers ); */ - while( node != NULL ) { - header = ( http_header_t * ) node->item; - /* NNS: header = (http_header_t *)node->data; */ - printf( "hdr name: %.*s, value: %.*s\n", - (int)header->name.length, header->name.buf, - (int)header->value.length, header->value.buf ); - - node = ListNext( &hmsg->headers, node ); - /* NNS: node = dlist_next( &hmsg->headers, node ); */ - } -} -#endif /* DEBUG */ - Index: libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/httpparser.h =================================================================== --- libupnp-1.6.16~git.20120316.d3d17da6.orig/upnp/src/inc/httpparser.h 2012-03-13 09:32:58.000000000 +0000 +++ libupnp-1.6.16~git.20120316.d3d17da6/upnp/src/inc/httpparser.h 2012-03-17 23:35:48.000000000 +0000 @@ -476,21 +476,6 @@ ************************************************************************/ const char* method_to_str( IN http_method_t method ); -/*! - * \brief Print the HTTP headers. - */ -#ifdef DEBUG -void print_http_headers( - /*! [in] HTTP Message object. */ - http_message_t *hmsg); -#else -static UPNP_INLINE void print_http_headers(http_message_t *hmsg) -{ - return; - hmsg = hmsg; -} -#endif - #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ debian/patches/18-url-upnpstrings.patch0000644000000000000000000002633011735545665015305 0ustar unchanged: --- libupnp-1.6.16~git.20120315.c9f3e26f.orig/upnp/inc/upnp.h 2012-03-13 20:45:27.000000000 +0000 +++ libupnp-1.6.16~git.20120315.c9f3e26f/upnp/inc/upnp.h 2012-03-15 23:15:54.000000000 +0000 @@ -45,6 +45,7 @@ #include "upnpconfig.h" #include "UpnpGlobal.h" #include "UpnpInet.h" +#include "UpnpString.h" /* * \todo Document the exact reason of these include files and solve this @@ -642,7 +643,7 @@ int ErrCode; /** The control URL for service. */ - char CtrlUrl[NAME_SIZE]; + UpnpString *CtrlUrl; /** The DOM document describing the action. */ IXML_Document *ActionRequest; @@ -692,7 +693,7 @@ int ErrCode; /** The control URL for the service. */ - char CtrlUrl[NAME_SIZE]; + UpnpString *CtrlUrl; /** The name of the variable. */ char StateVarName[NAME_SIZE]; @@ -776,7 +777,7 @@ int ErrCode; /** The event URL being subscribed to or removed from. */ - char PublisherUrl[NAME_SIZE]; + UpnpString *PublisherUrl; /** The actual subscription time (for subscriptions only). */ int TimeOut; diff -u libupnp-1.6.16~git.20120315.c9f3e26f/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c --- libupnp-1.6.16~git.20120315.c9f3e26f/upnp/src/api/upnpapi.c 2012-03-15 23:15:54.000000000 +0000 +++ b/upnp/src/api/upnpapi.c @@ -1917,16 +1917,39 @@ #ifdef INCLUDE_CLIENT_APIS +/** + * \brief De-allocate a UpnpNonblockParam and its fields + */ +static void Param_delete(struct UpnpNonblockParam *Param) +{ + #define FREEMARK "FrEe" + if( 0 == memcmp(Param, FREEMARK, strlen(FREEMARK)) ) { + UpnpPrintf(UPNP_CRITICAL, API, __FILE__, __LINE__, + "Freeing already freed UpnpNonblockParam at %p\n", Param); + } else { + if( Param->Url ) + UpnpString_delete( Param->Url ); + else + UpnpPrintf(UPNP_CRITICAL, API, __FILE__, __LINE__, + "Freeing already freed UpnpNonblockParam string at %p\n", Param); + Param->Url = 0; + memcpy( Param, FREEMARK, strlen(FREEMARK) ); + free( Param ); // fixme: is param what's getting freed twice in subscription renewals ? + } +} +#endif /* INCLUDE_CLIENT_APIS */ + + +#ifdef INCLUDE_CLIENT_APIS int UpnpSubscribeAsync( UpnpClient_Handle Hnd, - const char *EvtUrl_const, + const char *EvtUrl, int TimeOut, Upnp_FunPtr Fun, const void *Cookie_const) { struct Handle_Info *SInfo = NULL; struct UpnpNonblockParam *Param; - char *EvtUrl = ( char * )EvtUrl_const; ThreadPoolJob job; memset(&job, 0, sizeof(job)); @@ -1969,13 +1992,14 @@ Param->FunName = SUBSCRIBE; Param->Handle = Hnd; - strncpy( Param->Url, EvtUrl, sizeof( Param->Url ) - 1 ); + Param->Url = UpnpString_new(); + UpnpString_set_String( Param->Url, EvtUrl ); Param->TimeOut = TimeOut; Param->Fun = Fun; Param->Cookie = (void *)Cookie_const; TPJobInit(&job, (start_routine)UpnpThreadDistribution, Param); - TPJobSetFreeFunction(&job, (free_routine)free); + TPJobSetFreeFunction(&job, (free_routine)Param_delete); TPJobSetPriority(&job, MED_PRIORITY); ThreadPoolAdd(&gSendThreadPool, &job, NULL); @@ -2161,7 +2185,7 @@ Param->Fun = Fun; Param->Cookie = (void *)Cookie_const; TPJobInit( &job, ( start_routine ) UpnpThreadDistribution, Param ); - TPJobSetFreeFunction( &job, ( free_routine ) free ); + TPJobSetFreeFunction( &job, ( free_routine ) Param_delete ); TPJobSetPriority( &job, MED_PRIORITY ); ThreadPoolAdd( &gSendThreadPool, &job, NULL ); @@ -2287,7 +2311,7 @@ Param->TimeOut = TimeOut; TPJobInit( &job, ( start_routine ) UpnpThreadDistribution, Param ); - TPJobSetFreeFunction( &job, ( free_routine ) free ); + TPJobSetFreeFunction( &job, ( free_routine ) Param_delete ); TPJobSetPriority( &job, MED_PRIORITY ); ThreadPoolAdd( &gSendThreadPool, &job, NULL ); @@ -2679,7 +2703,7 @@ int UpnpSendActionAsync( UpnpClient_Handle Hnd, - const char *ActionURL_const, + const char *ActionURL, const char *ServiceType_const, const char *DevUDN_const, IXML_Document *Act, @@ -2691,7 +2715,6 @@ struct Handle_Info *SInfo = NULL; struct UpnpNonblockParam *Param; DOMString tmpStr; - char *ActionURL = (char *)ActionURL_const; char *ServiceType = (char *)ServiceType_const; /* udn not used? */ /*char *DevUDN = (char *)DevUDN_const;*/ @@ -2738,7 +2761,8 @@ Param->FunName = ACTION; Param->Handle = Hnd; - strncpy( Param->Url, ActionURL, sizeof ( Param->Url ) - 1 ); + Param->Url = UpnpString_new(); + UpnpString_set_String( Param->Url, ActionURL ); strncpy( Param->ServiceType, ServiceType, sizeof ( Param->ServiceType ) - 1 ); @@ -2757,7 +2781,7 @@ Param->Fun = Fun; TPJobInit( &job, ( start_routine ) UpnpThreadDistribution, Param ); - TPJobSetFreeFunction( &job, ( free_routine ) free ); + TPJobSetFreeFunction( &job, ( free_routine ) Param_delete ); TPJobSetPriority( &job, MED_PRIORITY ); ThreadPoolAdd( &gSendThreadPool, &job, NULL ); @@ -2771,7 +2795,7 @@ int UpnpSendActionExAsync( UpnpClient_Handle Hnd, - const char *ActionURL_const, + const char *ActionURL, const char *ServiceType_const, const char *DevUDN_const, IXML_Document *Header, @@ -2783,7 +2807,6 @@ struct UpnpNonblockParam *Param; DOMString tmpStr; DOMString headerStr = NULL; - char *ActionURL = ( char * )ActionURL_const; char *ServiceType = ( char * )ServiceType_const; ThreadPoolJob job; int retVal = 0; @@ -2798,7 +2821,7 @@ "Inside UpnpSendActionExAsync\n"); if( Header == NULL ) { - retVal = UpnpSendActionAsync( Hnd, ActionURL_const, + retVal = UpnpSendActionAsync( Hnd, ActionURL, ServiceType_const, DevUDN_const, Act, Fun, Cookie_const ); return retVal; @@ -2838,7 +2861,8 @@ Param->FunName = ACTION; Param->Handle = Hnd; - strncpy( Param->Url, ActionURL, sizeof( Param->Url ) - 1 ); + Param->Url = UpnpString_new(); + UpnpString_set_String( Param->Url, ActionURL ); strncpy( Param->ServiceType, ServiceType, sizeof ( Param->ServiceType ) - 1 ); retVal = ixmlParseBufferEx( headerStr, &( Param->Header ) ); @@ -2874,7 +2898,7 @@ Param->Fun = Fun; TPJobInit( &job, ( start_routine ) UpnpThreadDistribution, Param ); - TPJobSetFreeFunction( &job, ( free_routine ) free ); + TPJobSetFreeFunction( &job, ( free_routine ) Param_delete ); TPJobSetPriority( &job, MED_PRIORITY ); ThreadPoolAdd( &gSendThreadPool, &job, NULL ); @@ -2888,7 +2912,7 @@ int UpnpGetServiceVarStatusAsync( UpnpClient_Handle Hnd, - const char *ActionURL_const, + const char *ActionURL, const char *VarName_const, Upnp_FunPtr Fun, const void *Cookie_const) @@ -2896,7 +2920,6 @@ ThreadPoolJob job; struct Handle_Info *SInfo = NULL; struct UpnpNonblockParam *Param; - char *ActionURL = (char *)ActionURL_const; char *VarName = (char *)VarName_const; memset(&job, 0, sizeof(job)); @@ -2934,13 +2957,14 @@ Param->FunName = STATUS; Param->Handle = Hnd; - strncpy( Param->Url, ActionURL, sizeof( Param->Url ) - 1); + Param->Url = UpnpString_new(); + UpnpString_set_String( Param->Url, ActionURL ); strncpy( Param->VarName, VarName, sizeof( Param->VarName ) - 1 ); Param->Fun = Fun; Param->Cookie = ( void * )Cookie_const; TPJobInit( &job, ( start_routine ) UpnpThreadDistribution, Param ); - TPJobSetFreeFunction( &job, ( free_routine ) free ); + TPJobSetFreeFunction( &job, ( free_routine ) Param_delete ); TPJobSetPriority( &job, MED_PRIORITY ); @@ -3588,23 +3612,21 @@ case SUBSCRIBE: { struct Upnp_Event_Subscribe Evt; UpnpString *Sid = UpnpString_new(); - UpnpString *Url = UpnpString_new(); - UpnpString_set_String(Url, Param->Url); + UpnpString *Url = UpnpString_dup(Param->Url); memset(&Evt, 0, sizeof(Evt)); Evt.ErrCode = genaSubscribe( Param->Handle, Url, (int *)&Param->TimeOut, Sid); - strncpy(Evt.PublisherUrl, Param->Url, - sizeof(Evt.PublisherUrl) - 1); + UpnpString_assign(Evt.PublisherUrl, Param->Url); Evt.TimeOut = Param->TimeOut; strncpy((char *)Evt.Sid, UpnpString_get_String(Sid), sizeof(Evt.Sid) - 1); Param->Fun(UPNP_EVENT_SUBSCRIBE_COMPLETE, &Evt, Param->Cookie); UpnpString_delete(Sid); UpnpString_delete(Url); - free(Param); + Param_delete(Param); break; } case UNSUBSCRIBE: { @@ -3617,11 +3639,11 @@ Sid); strncpy((char *)Evt.Sid, UpnpString_get_String(Sid), sizeof(Evt.Sid) - 1); - strncpy(Evt.PublisherUrl, "", sizeof(Evt.PublisherUrl) - 1); + UpnpString_delete(Evt.PublisherUrl); Evt.TimeOut = 0; Param->Fun(UPNP_EVENT_UNSUBSCRIBE_COMPLETE, &Evt, Param->Cookie); UpnpString_delete(Sid); - free(Param); + Param_delete(Param); break; } case RENEW: { @@ -3638,7 +3660,7 @@ sizeof(Evt.Sid) - 1); Param->Fun(UPNP_EVENT_RENEWAL_COMPLETE, &Evt, Param->Cookie); UpnpString_delete(Sid); - free(Param); + Param_delete(Param); break; } #endif /* EXCLUDE_GENA == 0 */ @@ -3648,30 +3670,32 @@ memset(&Evt, 0, sizeof(Evt)); Evt.ActionResult = NULL; Evt.ErrCode = SoapSendAction( - Param->Url, + UpnpString_get_String(Param->Url), Param->ServiceType, Param->Act, &Evt.ActionResult); Evt.ActionRequest = Param->Act; - strncpy(Evt.CtrlUrl, Param->Url, sizeof(Evt.CtrlUrl) - 1); + Evt.CtrlUrl = UpnpString_new(); + UpnpString_assign(Evt.CtrlUrl, Param->Url); Param->Fun(UPNP_CONTROL_ACTION_COMPLETE, &Evt, Param->Cookie); ixmlDocument_free(Evt.ActionRequest); ixmlDocument_free(Evt.ActionResult); - free(Param); + Param_delete(Param); break; } case STATUS: { struct Upnp_State_Var_Complete Evt; memset(&Evt, 0, sizeof(Evt)); Evt.ErrCode = SoapGetServiceVarStatus( - Param->Url, + UpnpString_get_String(Param->Url), Param->VarName, &Evt.CurrentVal); strncpy(Evt.StateVarName, Param->VarName, sizeof(Evt.StateVarName) - 1); - strncpy(Evt.CtrlUrl, Param->Url, sizeof(Evt.CtrlUrl) - 1); + Evt.CtrlUrl = UpnpString_new(); + UpnpString_assign(Evt.CtrlUrl, Param->Url); Param->Fun(UPNP_CONTROL_GET_VAR_COMPLETE, &Evt, Param->Cookie); free(Evt.CurrentVal); - free(Param); + Param_delete(Param); break; } #endif /* EXCLUDE_SOAP == 0 */ unchanged: --- libupnp-1.6.16~git.20120315.c9f3e26f.orig/upnp/src/inc/upnpapi.h 2012-03-15 19:51:05.000000000 +0000 +++ libupnp-1.6.16~git.20120315.c9f3e26f/upnp/src/inc/upnpapi.h 2012-03-15 23:15:54.000000000 +0000 @@ -229,7 +229,7 @@ char DevId[NAME_SIZE]; char ServiceType[NAME_SIZE]; char ServiceVer[NAME_SIZE]; - char Url[NAME_SIZE]; + UpnpString *Url; Upnp_SID SubsId; char *Cookie; Upnp_FunPtr Fun; unchanged: --- libupnp-1.6.16~git.20120315.c9f3e26f.orig/upnp/src/gena/gena_ctrlpt.c 2012-03-15 19:51:05.000000000 +0000 +++ libupnp-1.6.16~git.20120315.c9f3e26f/upnp/src/gena/gena_ctrlpt.c 2012-03-15 23:50:11.000000000 +0000 @@ -173,8 +173,8 @@ RenewEventStruct->TimeOut = TimeOut; strncpy(RenewEventStruct->Sid, UpnpString_get_String(tmpSID), sizeof(RenewEventStruct->Sid) - 1); - strncpy(RenewEventStruct->PublisherUrl, - UpnpString_get_String(tmpEventURL), NAME_SIZE - 1); + RenewEventStruct->PublisherUrl = UpnpString_new(); + UpnpString_assign(RenewEventStruct->PublisherUrl, tmpEventURL); /* RenewEvent->EventType=UPNP_EVENT_SUBSCRIPTION_EXPIRE; */ RenewEvent->handle = client_handle; debian/patches/01-debian-md5-licence.patch0000644000000000000000000005715611725415003015375 0ustar Description: Replace RSA Inc copyright MD5 functions by public domain implementation. Bug-Debian: http://bugs.debian.org/459516 Index: libupnp-1.6.16+git.3e7bf144/configure.ac =================================================================== --- libupnp-1.6.16+git.3e7bf144.orig/configure.ac 2012-03-06 14:06:06.000000000 +0000 +++ libupnp-1.6.16+git.3e7bf144/configure.ac 2012-03-06 14:06:37.000000000 +0000 @@ -542,6 +542,9 @@ # Checks for typedefs, structures, and compiler characteristics # AC_C_CONST +AC_C_BIGENDIAN +AC_CHECK_SIZEOF(unsigned int) +AC_CHECK_SIZEOF(unsigned long) # The test for socklen_t was getting it wrong when it exists but is in ws2tcpip.h, # so we use a new test. Index: libupnp-1.6.16+git.3e7bf144/upnp/src/inc/md5.h =================================================================== --- libupnp-1.6.16+git.3e7bf144.orig/upnp/src/inc/md5.h 2012-03-06 14:06:06.000000000 +0000 +++ libupnp-1.6.16+git.3e7bf144/upnp/src/inc/md5.h 2012-03-06 14:06:37.000000000 +0000 @@ -1,39 +1,47 @@ -/* MD5.H - header file for MD5C.C */ - - -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. +/* + * This is the header file for the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + * + * Changed so as no longer to depend on Colin Plumb's `usual.h' + * header definitions; now uses stuff from dpkg's config.h + * - Ian Jackson . + * Still in the public domain. */ +#ifndef MD5_H +#define MD5_H -/* MD5 context. */ -typedef struct { +#define md5byte unsigned char - UINT4 state[4]; /* state (ABCD) */ - UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ - unsigned char buffer[64]; /* input buffer */ - -} MD5_CTX; - -void MD5Init PROTO_LIST ((MD5_CTX *)); -void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int)); -void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); +#if SIZEOF_UNSIGNED_LONG==4 +# define UWORD32 unsigned long +#elif SIZEOF_UNSIGNED_INT==4 +# define UWORD32 unsigned int +#else +# error I do not know what to use for a UWORD32. +#endif + +struct MD5Context { + UWORD32 buf[4]; + UWORD32 bytes[2]; + UWORD32 in[16]; +}; + +void MD5Init(struct MD5Context *context); +void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len); +void MD5Final(unsigned char digest[16], struct MD5Context *context); +void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]); +#endif /* !MD5_H */ Index: libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/md5.c =================================================================== --- libupnp-1.6.16+git.3e7bf144.orig/upnp/src/uuid/md5.c 2012-03-06 14:06:06.000000000 +0000 +++ libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/md5.c 2012-03-06 14:06:57.000000000 +0000 @@ -1,353 +1,241 @@ /* - MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + * + * Changed so as no longer to depend on Colin Plumb's `usual.h' header + * definitions; now uses stuff from dpkg's config.h. + * - Ian Jackson . + * Still in the public domain. */ - -/* - Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - - */ - #include "config.h" -#include "global.h" -#include "md5.h" -/* - Constants for MD5Transform routine. - */ -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 - -static void MD5Transform PROTO_LIST((UINT4[4], unsigned char[64])); -static void Encode PROTO_LIST((unsigned char *, UINT4 *, unsigned int)); -static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int)); -static void MD5_memcpy PROTO_LIST((POINTER, POINTER, unsigned int)); -static void MD5_memset PROTO_LIST((POINTER, int, unsigned int)); - -static unsigned char PADDING[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - F, G, H and I are basic MD5 functions. - */ -#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) -#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* - ROTATE_LEFT rotates x left n bits. - */ -#define ROTATE_LEFT(x, n) (((x) <<(n)) | ((x) >> (32-(n)))) +#include /* for memcpy() */ +#include /* for stupid systems */ +#include /* for ntohl() */ -/* - FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. - Rotation is separate from addition to prevent recomputation. - */ -#define FF(a, b, c, d, x, s, ac) { \ - (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } - -#define GG(a, b, c, d, x, s, ac) { \ - (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } - -#define HH(a, b, c, d, x, s, ac) { \ - (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } - -#define II(a, b, c, d, x, s, ac) { \ - (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - } +#include "md5.h" -/* - MD5 initialization. Begins an MD5 operation, writing a new context. - */ +#ifdef WORDS_BIGENDIAN void -MD5Init(MD5_CTX * context) +byteSwap(UWORD32 *buf, unsigned words) { - context->count[0] = context->count[1] = 0; - /* Load magic initialization constants. */ - context->state[0] = 0x67452301; - context->state[1] = 0xefcdab89; - context->state[2] = 0x98badcfe; - context->state[3] = 0x10325476; + md5byte *p = (md5byte *)buf; + + do { + *buf++ = (UWORD32)((unsigned)p[3] << 8 | p[2]) << 16 | + ((unsigned)p[1] << 8 | p[0]); + p += 4; + } while (--words); } +#else +#define byteSwap(buf,words) +#endif /* - MD5 block update operation. Continues an MD5 message-digest - operation, processing another message block, and updating the - context. + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. */ - void -MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputLen) +MD5Init(struct MD5Context *ctx) { - unsigned int i; - unsigned int index; - unsigned int partLen; - - /* Compute number of bytes mod 64 */ - index = (unsigned int)((context->count[0] >> 3) & 0x3F); - - /* Update number of bits */ - if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) { - context->count[1]++; - } - context->count[1] += ((UINT4)inputLen >> 29); - partLen = 64 - index; + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; - /* Transform as many times as possible. */ - if (inputLen >= partLen) { - MD5_memcpy((POINTER)&context->buffer[index], (POINTER)input, partLen); - MD5Transform(context->state, context->buffer); - for (i = partLen; i + 63 < inputLen; i += 64) { - MD5Transform(context->state, &input[i]); - } - index = 0; - } else { - i = 0; - } - - /* Buffer remaining input */ - MD5_memcpy((POINTER)&context->buffer[index], (POINTER)&input[i], inputLen - i); + ctx->bytes[0] = 0; + ctx->bytes[1] = 0; } /* - MD5 finalization. Ends an MD5 message-digest operation, writing the - the message digest and zeroizing the context. + * Update context to reflect the concatenation of another buffer full + * of bytes. */ void -MD5Final(unsigned char digest[16], MD5_CTX *context) +MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len) { - unsigned char bits[8]; - unsigned int index; - unsigned int padLen; - - /* Save number of bits */ - Encode(bits, context->count, 8); - - /* Pad out to 56 mod 64. */ - index = (unsigned int)((context->count[0] >> 3) & 0x3f); - padLen = (index < 56) ? (56 - index) : (120 - index); - MD5Update(context, PADDING, padLen); + UWORD32 t; - /* Append length (before padding) */ - MD5Update(context, bits, 8); + /* Update byte count */ - /* Store state in digest */ - Encode(digest, context->state, 16); + t = ctx->bytes[0]; + if ((ctx->bytes[0] = t + len) < t) + ctx->bytes[1]++; /* Carry from low to high */ + + t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */ + if (t > len) { + memcpy((md5byte *)ctx->in + 64 - t, buf, len); + return; +} + /* First chunk is an odd size */ + memcpy((md5byte *)ctx->in + 64 - t, buf, t); + byteSwap(ctx->in, 16); + MD5Transform(ctx->buf, ctx->in); + buf += t; + len -= t; + + /* Process data in 64-byte chunks */ + while (len >= 64) { + memcpy(ctx->in, buf, 64); + byteSwap(ctx->in, 16); + MD5Transform(ctx->buf, ctx->in); + buf += 64; + len -= 64; + } - /* Zeroize sensitive information. */ - MD5_memset((POINTER)context, 0, sizeof(*context)); + /* Handle any remaining bytes of data. */ + memcpy(ctx->in, buf, len); } -/* - MD5 basic transformation. Transforms state based on block. - */ -static void -MD5Transform(UINT4 state[4], unsigned char block[64]) -{ - UINT4 a = state[0], - b = state[1], - c = state[2], - d = state[3], - x[16]; - - Decode( x, block, 64 ); - /* - Round 1 + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) */ - FF( a, b, c, d, x[0], S11, 0xd76aa478 ); /* 1 */ - FF( d, a, b, c, x[1], S12, 0xe8c7b756 ); /* 2 */ - FF( c, d, a, b, x[2], S13, 0x242070db ); /* 3 */ - FF( b, c, d, a, x[3], S14, 0xc1bdceee ); /* 4 */ - FF( a, b, c, d, x[4], S11, 0xf57c0faf ); /* 5 */ - FF( d, a, b, c, x[5], S12, 0x4787c62a ); /* 6 */ - FF( c, d, a, b, x[6], S13, 0xa8304613 ); /* 7 */ - FF( b, c, d, a, x[7], S14, 0xfd469501 ); /* 8 */ - FF( a, b, c, d, x[8], S11, 0x698098d8 ); /* 9 */ - FF( d, a, b, c, x[9], S12, 0x8b44f7af ); /* 10 */ - FF( c, d, a, b, x[10], S13, 0xffff5bb1 ); /* 11 */ - FF( b, c, d, a, x[11], S14, 0x895cd7be ); /* 12 */ - FF( a, b, c, d, x[12], S11, 0x6b901122 ); /* 13 */ - FF( d, a, b, c, x[13], S12, 0xfd987193 ); /* 14 */ - FF( c, d, a, b, x[14], S13, 0xa679438e ); /* 15 */ - FF( b, c, d, a, x[15], S14, 0x49b40821 ); /* 16 */ +void +MD5Final(md5byte digest[16], struct MD5Context *ctx) +{ + int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */ + md5byte *p = (md5byte *)ctx->in + count; - /* - Round 2 - */ - GG( a, b, c, d, x[1], S21, 0xf61e2562 ); /* 17 */ - GG( d, a, b, c, x[6], S22, 0xc040b340 ); /* 18 */ - GG( c, d, a, b, x[11], S23, 0x265e5a51 ); /* 19 */ - GG( b, c, d, a, x[0], S24, 0xe9b6c7aa ); /* 20 */ - GG( a, b, c, d, x[5], S21, 0xd62f105d ); /* 21 */ - GG( d, a, b, c, x[10], S22, 0x2441453 ); /* 22 */ - GG( c, d, a, b, x[15], S23, 0xd8a1e681 ); /* 23 */ - GG( b, c, d, a, x[4], S24, 0xe7d3fbc8 ); /* 24 */ - GG( a, b, c, d, x[9], S21, 0x21e1cde6 ); /* 25 */ - GG( d, a, b, c, x[14], S22, 0xc33707d6 ); /* 26 */ - GG( c, d, a, b, x[3], S23, 0xf4d50d87 ); /* 27 */ - GG( b, c, d, a, x[8], S24, 0x455a14ed ); /* 28 */ - GG( a, b, c, d, x[13], S21, 0xa9e3e905 ); /* 29 */ - GG( d, a, b, c, x[2], S22, 0xfcefa3f8 ); /* 30 */ - GG( c, d, a, b, x[7], S23, 0x676f02d9 ); /* 31 */ - GG( b, c, d, a, x[12], S24, 0x8d2a4c8a ); /* 32 */ + /* Set the first char of padding to 0x80. There is always room. */ + *p++ = 0x80; - /* - Round 3 - */ - HH( a, b, c, d, x[5], S31, 0xfffa3942 ); /* 33 */ - HH( d, a, b, c, x[8], S32, 0x8771f681 ); /* 34 */ - HH( c, d, a, b, x[11], S33, 0x6d9d6122 ); /* 35 */ - HH( b, c, d, a, x[14], S34, 0xfde5380c ); /* 36 */ - HH( a, b, c, d, x[1], S31, 0xa4beea44 ); /* 37 */ - HH( d, a, b, c, x[4], S32, 0x4bdecfa9 ); /* 38 */ - HH( c, d, a, b, x[7], S33, 0xf6bb4b60 ); /* 39 */ - HH( b, c, d, a, x[10], S34, 0xbebfbc70 ); /* 40 */ - HH( a, b, c, d, x[13], S31, 0x289b7ec6 ); /* 41 */ - HH( d, a, b, c, x[0], S32, 0xeaa127fa ); /* 42 */ - HH( c, d, a, b, x[3], S33, 0xd4ef3085 ); /* 43 */ - HH( b, c, d, a, x[6], S34, 0x4881d05 ); /* 44 */ - HH( a, b, c, d, x[9], S31, 0xd9d4d039 ); /* 45 */ - HH( d, a, b, c, x[12], S32, 0xe6db99e5 ); /* 46 */ - HH( c, d, a, b, x[15], S33, 0x1fa27cf8 ); /* 47 */ - HH( b, c, d, a, x[2], S34, 0xc4ac5665 ); /* 48 */ + /* Bytes of padding needed to make 56 bytes (-8..55) */ + count = 56 - 1 - count; - /* - Round 4 - */ - II( a, b, c, d, x[0], S41, 0xf4292244 ); /* 49 */ - II( d, a, b, c, x[7], S42, 0x432aff97 ); /* 50 */ - II( c, d, a, b, x[14], S43, 0xab9423a7 ); /* 51 */ - II( b, c, d, a, x[5], S44, 0xfc93a039 ); /* 52 */ - II( a, b, c, d, x[12], S41, 0x655b59c3 ); /* 53 */ - II( d, a, b, c, x[3], S42, 0x8f0ccc92 ); /* 54 */ - II( c, d, a, b, x[10], S43, 0xffeff47d ); /* 55 */ - II( b, c, d, a, x[1], S44, 0x85845dd1 ); /* 56 */ - II( a, b, c, d, x[8], S41, 0x6fa87e4f ); /* 57 */ - II( d, a, b, c, x[15], S42, 0xfe2ce6e0 ); /* 58 */ - II( c, d, a, b, x[6], S43, 0xa3014314 ); /* 59 */ - II( b, c, d, a, x[13], S44, 0x4e0811a1 ); /* 60 */ - II( a, b, c, d, x[4], S41, 0xf7537e82 ); /* 61 */ - II( d, a, b, c, x[11], S42, 0xbd3af235 ); /* 62 */ - II( c, d, a, b, x[2], S43, 0x2ad7d2bb ); /* 63 */ - II( b, c, d, a, x[9], S44, 0xeb86d391 ); /* 64 */ - - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; + if (count < 0) { /* Padding forces an extra block */ + memset(p, 0, count + 8); + byteSwap(ctx->in, 16); + MD5Transform(ctx->buf, ctx->in); + p = (md5byte *)ctx->in; + count = 56; + } + memset(p, 0, count); + byteSwap(ctx->in, 14); - /* - Zeroize sensitive information. - */ - MD5_memset( ( POINTER ) x, 0, sizeof( x ) ); + /* Append length in bits and transform */ + ctx->in[14] = ctx->bytes[0] << 3; + ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29; + MD5Transform(ctx->buf, ctx->in); + byteSwap(ctx->buf, 4); + memcpy(digest, ctx->buf, 16); + memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ } -/* - Encodes input (UINT4) into output (unsigned char). Assumes len is - a multiple of 4. - */ -static void -Encode(unsigned char *output, UINT4 *input, unsigned int len) -{ - unsigned int i; - unsigned int j; - for (i = 0, j = 0; j < len; ++i, j += 4) { - output[j+0] = (unsigned char)((input[i] >> 0) & 0xff); - output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); - output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); - output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); - } -} +#ifndef ASM_MD5 -/* - Decodes input (unsigned char) into output (UINT4). Assumes len is - a multiple of 4. - */ +/* The four core functions - F1 is optimized somewhat */ -static void -Decode(UINT4 *output, unsigned char *input, unsigned int len) -{ - unsigned int i; - unsigned int j; - for (i = 0, j = 0; j < len; ++i, j += 4) { - output[i] = - (((UINT4)input[j+0]) << 0) | - (((UINT4)input[j+1]) << 8) | - (((UINT4)input[j+2]) << 16) | - (((UINT4)input[j+3]) << 24); - } -} +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) -/* - Note: Replace for loop with standard memcpy if possible. - */ -static void -MD5_memcpy(POINTER output, POINTER input, unsigned int len) -{ - unsigned int i; - for (i = 0; i < len; ++i) { - output[i] = input[i]; - } -} +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f,w,x,y,z,in,s) \ + (w += f(x,y,z) + in, w = (w<>(32-s)) + x) /* - Note: Replace for loop with standard memset if possible. + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. */ -static void -MD5_memset(POINTER output, int value, unsigned int len) +void +MD5Transform(UWORD32 buf[4], UWORD32 const in[16]) { - unsigned int i; - for (i = 0; i < len; ++i) { - ((char *)output)[i] = (char)value; - } + register UWORD32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; } +#endif Index: libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/sysdep.c =================================================================== --- libupnp-1.6.16+git.3e7bf144.orig/upnp/src/uuid/sysdep.c 2012-03-06 14:06:06.000000000 +0000 +++ libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/sysdep.c 2012-03-06 14:06:37.000000000 +0000 @@ -78,7 +78,7 @@ void get_random_info(unsigned char seed[16]) { - MD5_CTX c; + struct MD5Context c; typedef struct { MEMORYSTATUS m; SYSTEM_INFO s; @@ -126,7 +126,7 @@ void get_random_info(unsigned char seed[16]) { - MD5_CTX c; + struct MD5Context c; typedef struct { /*struct sysinfo s; */ struct timeval t; Index: libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/uuid.c =================================================================== --- libupnp-1.6.16+git.3e7bf144.orig/upnp/src/uuid/uuid.c 2012-03-06 14:06:06.000000000 +0000 +++ libupnp-1.6.16+git.3e7bf144/upnp/src/uuid/uuid.c 2012-03-06 14:06:37.000000000 +0000 @@ -232,7 +232,7 @@ /*! The length of the name. */ int namelen) { - MD5_CTX c; + struct MD5Context c; unsigned char hash[16]; uuid_upnp net_nsid; /* context UUID in network byte order */ debian/patches/0001-Security-fix-for-CERT-issue-VU-922681.branch-1.6.patch0000644000000000000000000000640112103032700022100 0ustar This patch addresses three possible buffer overflows in function unique_service_name(). The three issues have the folowing CVE numbers: CVE-2012-5958 Issue #2: Stack buffer overflow of Tempbuf CVE-2012-5959 Issue #4: Stack buffer overflow of Event->UDN CVE-2012-5960 Issue #8: Stack buffer overflow of Event->UDN Notice that the following issues have already been dealt by previous work: CVE-2012-5961 Issue #1: Stack buffer overflow of Evt->UDN CVE-2012-5962 Issue #3: Stack buffer overflow of Evt->DeviceType CVE-2012-5963 Issue #5: Stack buffer overflow of Event->UDN CVE-2012-5964 Issue #6: Stack buffer overflow of Event->DeviceType CVE-2012-5965 Issue #7: Stack buffer overflow of Event->DeviceType --- ChangeLog | 20 ++++++++++++++++++++ upnp/src/ssdp/ssdp_server.c | 18 ++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/upnp/src/ssdp/ssdp_server.c b/upnp/src/ssdp/ssdp_server.c index 231c2c5..8a57d08 100644 --- a/upnp/src/ssdp/ssdp_server.c +++ b/upnp/src/ssdp/ssdp_server.c @@ -467,16 +467,16 @@ int unique_service_name(char *cmd, SsdpEvent *Evt) else return -1; if (ptr3 != NULL) { - if (strlen("uuid:") + strlen(ptr3 + 1) >= sizeof(Evt->UDN)) + if (strlen("uuid:") + strlen(ptr3 + 1) >= sizeof Evt->UDN) return -1; - snprintf(Evt->UDN, sizeof(Evt->UDN), "uuid:%s", - ptr3 + 1); + snprintf(Evt->UDN, sizeof Evt->UDN, "uuid:%s", ptr3 + 1); } else return -1; ptr1 = strstr(cmd, ":"); if (ptr1 != NULL) { n = (size_t)ptr3 - (size_t)ptr1; + n = n >= sizeof TempBuf ? sizeof TempBuf - 1 : n; strncpy(TempBuf, ptr1, n); TempBuf[n] = '\0'; if (strlen("urn") + strlen(TempBuf) >= sizeof(Evt->DeviceType)) @@ -490,27 +490,28 @@ int unique_service_name(char *cmd, SsdpEvent *Evt) if ((TempPtr = strstr(cmd, "uuid")) != NULL) { if ((Ptr = strstr(cmd, "::")) != NULL) { n = (size_t)Ptr - (size_t)TempPtr; + n = n >= sizeof Evt->UDN ? sizeof Evt->UDN - 1 : n; strncpy(Evt->UDN, TempPtr, n); Evt->UDN[n] = '\0'; } else { memset(Evt->UDN, 0, sizeof(Evt->UDN)); - strncpy(Evt->UDN, TempPtr, sizeof(Evt->UDN) - 1); + strncpy(Evt->UDN, TempPtr, sizeof Evt->UDN - 1); } CommandFound = 1; } if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":service:") != NULL) { if ((TempPtr = strstr(cmd, "urn")) != NULL) { - memset(Evt->ServiceType, 0, sizeof(Evt->ServiceType)); + memset(Evt->ServiceType, 0, sizeof Evt->ServiceType); strncpy(Evt->ServiceType, TempPtr, - sizeof(Evt->ServiceType) - 1); + sizeof Evt->ServiceType - 1); CommandFound = 1; } } if (strstr(cmd, "urn:") != NULL && strstr(cmd, ":device:") != NULL) { if ((TempPtr = strstr(cmd, "urn")) != NULL) { - memset(Evt->DeviceType, 0, sizeof(Evt->DeviceType)); + memset(Evt->DeviceType, 0, sizeof Evt->DeviceType); strncpy(Evt->DeviceType, TempPtr, - sizeof(Evt->DeviceType) - 1); + sizeof Evt->DeviceType - 1); CommandFound = 1; } } @@ -518,6 +519,7 @@ int unique_service_name(char *cmd, SsdpEvent *Evt) /* Everything before "::upnp::rootdevice" is the UDN. */ if (TempPtr != cmd) { n = (size_t)TempPtr - (size_t)cmd; + n = n >= sizeof Evt->UDN ? sizeof Evt->UDN - 1 : n; strncpy(Evt->UDN, cmd, n); Evt->UDN[n] = 0; CommandFound = 1; -- 1.7.7 debian/watch0000644000000000000000000000011111642706711010215 0ustar version=3 http://sf.net/pupnp/libupnp-(\d.*)\.(?:tar.bz2|tar.gz|tar|tgz) debian/copyright0000644000000000000000000001630611742353210011125 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: pupnp Upstream-Contact: Marcelo Roberto Jimenez Source: http://sourceforge.net/projects/pupnp/files/pupnp/ git://pupnp.git.sourceforge.net/gitroot/pupnp/pupnp Comment: This is pupnp, the Portable SDK for UPnP Devices, which is a fork of Intel's Linux SDK for UPnP Devices. Files: * Copyright: 2000-2003 Intel Corporation - All Rights Reserved. 2005-2006 Rémi Turboult 2006 Michel Pfeiffer and others 2006 Alexander Chemeris 2007-2012 Marcelo Roberto Jimenez License: BSD-like License: BSD-like Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: debian/* Copyright: 2005-2007 Steve McIntyre <93sam@debian.org> 2008-2012 Nick Leverton License: BSD-like Files: upnp/src/*/sysdep.* upnp/src/*/uuid.* Copyright: 1990- 1993, 1996 Open Software Foundation, Inc. 1989 Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. 1998 Microsoft. License: To anyone who acknowledges that this file is provided "AS IS" without any express or implied warranty: permission to use, copy, modify, and distribute this file for any purpose is hereby granted without fee, provided that the above copyright notices and this notice appears in all source code copies, and that none of the names of Open Software Foundation, Inc., Hewlett-Packard Company, or Digital Equipment Corporation be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Neither Open Software Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment Corporation makes any representations about the suitability of this software for any purpose. Files: ixml/test/testdata/xml.ascc.net/* Copyright: 1998 Academia Sinica, http://xml.ascc.net/ License: Unless otherwise stated, permission is granted to use, copy, link to, translate and republish in any form, including for commercial use, providing due acknowledgement of the copyright holder and the Chinese XML Now! website is made. Files: */doc/docxx.sty Copyright: 1996 Roland Wunderling, Malte Zoeckler 1999-2001 Dragos Acostachioaie License: GPL-2+ Files: m4/ax_cflags*.m4 Copyright: 2006 Guido U. Draheim License: GPL-2+ with Autoconf exception Files: m4/acx_pthread.m4 Copyright: 2006 Steven G. Johnson License: GPL-2+ with Autoconf exception Files: m4/type_socklen_t.m4 Copyright: 2005 Lars Brinkhoff License: GPL-2+ with Autoconf exception License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. License: GPL-2+ with Autoconf exception This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . As a special exception, the respective Autoconf Macro's copyright owner gives unlimited permission to copy, distribute and modify the configure scripts that are the output of Autoconf when processing the Macro. You need not follow the terms of the GNU General Public License when using or distributing such scripts, even though portions of the text of the Macro appear in them. The GNU General Public License (GPL) does govern all other use of the material that constitutes the Autoconf Macro. . This special exception to the GPL applies to versions of the Autoconf Macro released by the Autoconf Macro Archive. When you make and distribute a modified version of the Autoconf Macro, you may extend this special exception to the GPL to apply to your modified version as well. Files: upnp/src/uuid/md5.c upnp/src/inc/md5.h: Copyright: 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License: License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. Comment: These files are replaced by an open version before compilation. Files: upnp/src/inet_pton.c Copyright: 1996-1999 Internet Software Consortium. License: Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. debian/libupnp6.lintian-overrides0000644000000000000000000000006711643201007014302 0ustar conflicts-with-version libupnp4 (<< 1.8.0~svn20090313) debian/libupnp6.install0000644000000000000000000000002111643170511012305 0ustar usr/lib/*/*.so.* debian/libupnp6-dbg.lintian-overrides0000644000000000000000000000007311643200776015045 0ustar conflicts-with-version libupnp4-dbg (<< 1.8.0~svn20090313) debian/libupnp6-doc.install0000644000000000000000000000005511650252573013066 0ustar docs/doxygen/html usr/share/doc/libupnp6-doc debian/source.lintian-overrides0000644000000000000000000000006011643175161014047 0ustar package-needs-versioned-debhelper-build-depends debian/libupnp6.dirs0000644000000000000000000000001011642706711011604 0ustar usr/lib debian/README.source0000644000000000000000000000031511742353000011337 0ustar Original source releases may be obtained from the upstream using the debian/watch file with uscan. Git versions, when applicable, may be obtained from git://pupnp.git.sourceforge.net/gitroot/pupnp/pupnp. debian/rules0000755000000000000000000000154511727175651010267 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 LDFLAGS_DEF += `dpkg-buildflags --get LDFLAGS` -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS = hardening=+pie,+bindnow %: dh $@ --with autotools-dev override_dh_auto_configure: autoreconf -f -i dh_auto_configure -- --without-documentation --disable-samples --enable-debug LDFLAGS="$(LDFLAGS_DEF)" override_dh_auto_build: dh_auto_build doxygen Doxyfile 2>/dev/null override_dh_auto_clean: $(RM) -r docs/doxygen dh_auto_clean find -name "Makefile.in" -print0 | xargs -0r $(RM) $(RM) tags # just in case $(RM) aclocal.m4 configure autoconfig.h.in override_dh_install: dh_install -plibupnp6-doc --sourcedir=. dh_install --remaining-packages -X.la --list-missing override_dh_strip: dh_strip --dbg-package=libupnp6-dbg override_dh_compress: dh_compress -Xhtml -X.pdf debian/libupnp6-doc.doc-base0000644000000000000000000000071011650536777013106 0ustar Document: libupnp Title: Libupnp: Portable SDK for UPnP Devices, version 1.6 Abstract: The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification. Section: Programming Format: HTML Index: /usr/share/doc/libupnp6-doc/html Files: /usr/share/doc/libupnp6-doc/html/* debian/control0000644000000000000000000000676411752232231010604 0ustar Source: libupnp Section: net Priority: extra Homepage: http://pupnp.sourceforge.net/ Maintainer: Nick Leverton Build-Depends: debhelper (>= 8.9~), autotools-dev (>= 20100122.1~), autoconf, automake, libtool, doxygen, graphviz Standards-Version: 3.9.3 Package: libupnp6 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libupnp0, libupnp2, libupnp3, libupnp4 (<< 1.8.0~svn20090313) Replaces: libupnp0, libupnp2, libupnp3 Pre-Depends: ${misc:Pre-Depends} Description: Portable SDK for UPnP Devices, version 1.6 (shared libraries) The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification - see http://www.upnp.org/ for specifications. . The libupnp6 package contains the runtime libraries for uPnP. Package: libupnp6-dev Architecture: any Section: libdevel Depends: libupnp6 (= ${binary:Version}), ${misc:Depends} Conflicts: libupnp3-dev, libupnp4-dev Suggests: libupnp6-doc Description: Portable SDK for UPnP Devices, version 1.6 (development files) The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification - see http://www.upnp.org/ for specifications. . The libupnp-dev package contains the header files, documentation and debug versions of libraries needed for development of programs using uPnP. Package: libupnp-dev Architecture: all Section: libdevel Depends: libupnp6-dev (>= ${binary:Version}), ${misc:Depends} Description: Portable SDK for UPnP Devices (development files) The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification - see http://www.upnp.org/ for specifications. . The libupnp-dev package is a metapackage which will depend on the current stable development package. Package: libupnp6-dbg Architecture: any Section: debug Depends: libupnp6 (= ${binary:Version}), ${misc:Depends} Conflicts: libupnp3-dbg, libupnp4-dbg (<< 1.8.0~svn20090313) Replaces: libupnp3-dbg Description: debugging symbols for libupnp6 The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification - see http://www.upnp.org/ for specifications. . This package contains the debugging symbols associated with libupnp6. They will automatically be used by gdb for debugging libupnp-related issues. . Most people will not need this package. Package: libupnp6-doc Architecture: all Section: doc Depends: ${misc:Depends} Replaces: libupnp3-dev Description: Documentation for the Portable SDK for UPnP Devices, version 1.6 The Portable SDK for UPnP Devices (libupnp) provides developers with an API and open source code for building control points, devices, and bridges that are compliant with Version 1.0 of the Universal Plug and Play Device Architecture Specification - see http://www.upnp.org/ for specifications. . This package contains the HTML documentation for the libupnp6 library in /usr/share/doc/libupnp6-doc/ debian/source/0000755000000000000000000000000011742333544010474 5ustar debian/source/format0000644000000000000000000000001411643054343011677 0ustar 3.0 (quilt)