Read Error At /usr/lib/perl5/xml/parser/expat.pm
Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads Find All Thanked Posts Go to Page... unix and linux commands - unix shell scripting xml parsing error in perl UNIX for Advanced & Expert Users Thread Tools Search this Thread Display Modes #1 05-30-2007 bishweshwar Registered User Join Date: Sep 2006 Last Activity: 4 April 2009, 9:46 AM EDT Posts: 56 Thanks: 0 Thanked 0 Times in 0 Posts xml parsing error in perl ******************PERL VERSION************************ This is perl, v5.8.1 built for i386-linux-thread-multi ERROR!!!!---Undefined subroutine &main::start called at /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/XML/Parser/Expat.pm line 469. *********************PERL CODE************************ # include package use XML::Parser; # initialize parser $xp = new XML::Parser; # set callback functions $xp->setHandlers(Start => \&start, END => \&end, Char => \&cdata); # parse XML $xp->parsefile("page1.xml"); ************************XML FILE*********************
Brought to you by: fdrake, hartwork, kwaclaw Summary Files Reviews Support Wiki Tickets ▾ Bugs Patches News Code Code_GIT Create Ticket View Stats Group Feature Request Not a Bug Platform Specific Test Required Searches Changes Closed Tickets Open Tickets Help Formatting Help #483 expat: buffer over-read and crash in big2_toUtf8() Milestone: Test Required Status: closed-fixed Owner: Karl Waclawek Labels: None Priority: 5 Updated: 2016-03-11 Created: 2009-11-08 Creator: Jan Lieskovsky Private: No Hello SourceForge expat maintainers, originally CVE-2009-3720 was reported in expat: [1] http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-3720 Non-public, original bug report for CVE-2009-3720: [2] http://sourceforge.net/tracker/?func=detail&aid=1990430&group_id=10127&atid=110127 And relevant patch for CVE-2009-3720: [3] http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmltok_impl.c?r1=1.13&r2=1.15&view=patch While the http://www.unix.com/unix-for-advanced-and-expert-users/38275-xml-parsing-error-perl.html above patch [3] solves the issue in expat itself and in various other packages (PyXML, 4Suite), which embed expat, or when called via perl-XML-Parser-Expat, it does not help,when using the same reproducer via perl-XML-Twig module. In this case the crash (buffer overread) occurs in expat's big2_toUtf8 () routine - more exactly in DEFINE_UTF16_TO_UTF8(big2_) macro in lib/xmltok.c:626. Have investigated the issue in more detail, and assuming the crash https://sourceforge.net/p/expat/bugs/483/ occurs in 540 E ## toUtf8(const ENCODING *enc, \...) routine, as present in expat-2.0.1/lib/xmltok.c (at line 540). Assuming the problematic line of the code is this one (lib/xmltok.c): 545 for (from = *fromP; from != fromLim; from += 2) { \ 'from' represents pointer to the start of XML data, we are about to parse, 'fromLim' represents upper bound - point, where parsing should end. In each pass of the for loop we increment 'from' value by two (because on lines: 548 unsigned char lo = GET_LO(from); \ 549 unsigned char hi = GET_HI(from); \ we consumed both parts of from). This works perfect, when addresses of 'from' and 'fromLim' are aligned, i.e. both are multiple of '2'. But the problem arises, when 'fromLim' has not value dividable by two (for example 165218551) - in that case, 'from' value can't never equal to 'fromLim' value (in last round == 'fromLim - 1', so we increment it by two, but now we already 'skipped' it from == fromLim + 1, and keep incrementing it (in the effort to reach from == fromLim condition) in an infinite loop, till the operating system recognizes we tried to access memory location, which doesn't belong
Plans & Pricing Partners Support Resources Preview Forums Forums Quick Links Search Forums New Posts Search https://forums.cpanel.net/threads/checkperlmodules-the-perl-module-xml-parser-could-not-be-installed.153849/ titles only Posted by Member: Separate names with a comma. Newer Than: Search this thread only Search this forum only Display results as threads More... Useful http://stackoverflow.com/questions/28100716/is-there-a-way-to-get-xmltwig-to-understand-a-utf-16-encoded-xml-file Searches Recent Posts Resources Resources Quick Links Search Resources Most Active Authors Latest Reviews Feature Requests Defects Menu Log in Sign up The Community Forums Interact read error with an entire community of cPanel & WHM users! cPanel Forums > cPanel & WHM® (for Linux® Servers) > General Discussion > This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More. [checkperlmodules] The perl module XML::Parser could not be installed. Discussion in read error at 'General Discussion' started by boatdesign, Apr 14, 2010. boatdesign Well-Known Member Joined: Sep 13, 2003 Messages: 158 Likes Received: 0 Trophy Points: 16 On Centos 5 64-bit, as of tonight's whm cron run I'm getting: [checkperlmodules] The perl module XML::Parser could not be installed. This module is required by cPanel, and the system may not function correctly until it is installed, and functional. Below is the results of the auto-install attempt: Test Run ============== Can't locate XML/Parser.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at - line 1. BEGIN failed--compilation aborted at - line 1. ... cPCPAN: Module (XML::Parser) holdback (2.36 held back to 2.34) cPCPAN: Module (XML::Parser) holdback (2.34 held back to 2.34) cPCPAN: Module (XML::Parser) holdback (2.34 held back to 2.34) Running install for module 'XML::Parser' ... CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build cPCPAN/XML-Parser-2.34.tar.gz perl-64bit-hack: enabled Checking if your kit is complete... Looks go
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Is there a way to get XML::Twig to understand a UTF-16-encoded XML file? up vote -1 down vote favorite Is there a way to get XML::Twig to understand a UTF-16-encoded XML file? The code to read the file is what was stated in the tutorials: use warnings; use strict; use XML::Twig; # ... my $twig=XML::Twig->new( twig_handlers => { ... }, prety_print => 'indented', keep_encoding => 1, }; # ... $twig->parsefile('myXmlFile.xml'); # <= line 71 Error is: error parsing tag '