summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
Commit message (Collapse)AuthorAgeFilesLines
* (error) va_list 'args' was opened but not closed by va_end()David Kalnischkies2014-11-081-4/+8
| | | | | | | | | | | | | The manpage of va_start and co additionally says: On some systems, va_end contains a closing '}' matching a '{' in va_start, so that both macros must occur in the same function, and in a way that allows this. So instead of return/breaking instantly, we save the return, make a proper turndown with va_end in all cases and only end after that. Reported-By: cppcheck Git-Dch: Ignore
* rewrite ReadMessages()David Kalnischkies2014-10-261-58/+66
| | | | | | | | | | | | | Central methods of our infrastructure like this one responsible for communication with our methods shouldn't be more complicated then they have to and not claim to have (albeit unlikely) bugs. While I am not sure about having improved the first part, the bug is now gone and a few explicit tests check that it stays that way, so nobody will notice the difference (hopefully) – expect that this should a very tiny bit faster as well as we don't manually proceed through the string. Git-Dch: Ignore
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-231-6/+18
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * strip everything spacey in APT::String::StripDavid Kalnischkies2014-09-071-6/+18
| | | | | | | | Git-Dch: Ignore
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-051-3/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc configure.ac debian/changelog doc/apt-verbatim.ent doc/po/apt-doc.pot doc/po/de.po doc/po/es.po doc/po/fr.po doc/po/it.po doc/po/ja.po doc/po/pt.po po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/tr.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
| * StringToBool: only act if the entire string is consumed by strtol()Michael Vogt2014-07-161-3/+6
| | | | | | | | | | | | | | | | | | StringToBool uses strtol() internally to check if the argument is a number. This function stops when it does not find any more numbers. So a string like "0ad" (which is a valid packagename) is interpreted as a "0". The code now checks that the entire string is consumed not just a part of it. Thanks to Johannes Schauer for raising this issue.
* | Only allow "apt-get build-dep path" when path starts with ./ or /Michael Vogt2014-07-081-0/+7
| | | | | | | | | | | | This avoid the subtle problem that someone might have a directory with the same package name as the build-depends he/she is trying to fetch. Also print a note that the specific file/dir is used.
* | Add new Base256ToNum long long overload functionGuillem Jover2014-07-081-1/+18
|/
* fix SubstVar to be usable as a replace_all methodDavid Kalnischkies2014-06-181-7/+14
| | | | | | | The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+7
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: cannot optimize loop, the loop counter may overflow ↵David Kalnischkies2014-03-131-1/+1
| | | | | | | [-Wunsafe-loop-optimizations] Git-Dch: Ignore Reported-By: gcc -Wunsafe-loop-optimizations
* warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* add default and override handling for Cnf::FindVectorDavid Kalnischkies2014-03-131-1/+3
| | | | | | Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-5/+5
|
* add "APT::String::Endswith" and automatic adding of ".list" in apt edit-sourceMichael Vogt2013-11-291-0/+8
|
* re-add missing APT::String::StripMichael Vogt2013-10-181-1/+16
|
* change maxsplit default from "0" to maxintMichael Vogt2013-10-011-1/+1
|
* improve documentation for StringSplit()Michael Vogt2013-10-011-4/+2
|
* doc updateMichael Vogt2013-09-071-6/+9
|
* add maxsplit parameter to StringSplitMichael Vogt2013-09-071-5/+13
|
* implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2013-09-071-0/+22
|
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-08-221-0/+2
|\ | | | | | | | | Conflicts: apt-pkg/tagfile.h
| * some more coverity fixesMichael Vogt2013-08-121-0/+2
| |
* | squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-0/+12
|/ | | | experimental
* fix another missing va_end()Michael Vogt2013-07-261-3/+3
|
* support \n and \r\n line endings in ReadMessagesDavid Kalnischkies2013-06-201-2/+3
|
* merged patch from Daniel Hartwig to fix URI and proxy releated issuesMichael Vogt2013-05-081-4/+5
|
* merged bundle from davidMichael Vogt2013-04-081-4/+4
|\
| * various simple changes to fix cppcheck warningsDavid Kalnischkies2013-03-101-4/+4
| |
* | split out a method to strip whitespaces only on the right sideMichael Vogt2013-03-151-1/+7
|/
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2012-04-211-20/+37
| | | - remove the message size limit from ioprintf and strprintf
* as we parse datestrings from external sources a lot specify the lengthDavid Kalnischkies2012-03-051-3/+3
| | | | | of the integer fields as well to avoid crashes in scanf as cppchecks warns: "(warning) scanf without field width limits can crash with huge input data"
* merge with my debian-sid branchDavid Kalnischkies2011-10-301-8/+7
|\
| * convert a few for-loop char finds to proper strchr and memchrDavid Kalnischkies2011-09-211-8/+7
| |
* | merge with debian/experimentalDavid Kalnischkies2011-09-131-12/+73
|\|
| * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-15/+15
| | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
| * fix typos in changelog, make DeEscapeString const, improve descriptionMichael Vogt2011-07-261-3/+3
| |
| * add another escape test case, fixup octal one (its \0XX instead of \0XXX)Michael Vogt2011-07-261-5/+4
| |
| * apt-pkg/contrib/strutl.cc: kill unneeded debug outputMichael Vogt2011-07-261-1/+0
| |
| * * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:Michael Vogt2011-07-261-0/+63
| | | | | | | | - add new DeEscapeString() similar to DeQuoteQuotedWord but unescape charackter escapes like \0XXX and \xXX (plus add test)
* | Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-0/+28
| | | | | | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-3/+3
|/
* let TimeRFC1123 return an empty string if gmtime() failsDavid Kalnischkies2011-04-021-2/+4
|
* impossible to be too long but just to be sure use snprintfDavid Kalnischkies2011-04-021-1/+1
|
* merge 'after squeeze release'-stuffDavid Kalnischkies2011-02-031-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ David Kalnischkies ] * apt-pkg/depcache.cc: - add SetCandidateRelease() to set a candidate version and the candidates of dependencies if needed to a specified release (Closes: #572709) * cmdline/apt-get.cc: - if --print-uris is used don't setup downloader as we don't need progress, lock nor the directories it would create otherwise - show dependencies of essential packages which are going to remove only if they cause the remove of this essential (Closes: #601961) - keep not installed garbage packages uninstalled instead of showing in the autoremove section and installing those (Closes: #604222) - change pkg/release behavior to use the new SetCandidateRelease so installing packages from experimental or backports is easier - really do not show packages in the extra section if they were requested on the commandline, e.g. with a modifier (Closes: #184730) * debian/control: - add Vcs-Browser now that loggerhead works again (Closes: #511168) - depend on debhelper 7 to raise compat level - depend on dpkg-dev (>= 1.15.8) to have c++ symbol mangling * apt-pkg/contrib/fileutl.cc: - add a RealFileExists method and check that your configuration files are real files to avoid endless loops if not (Closes: #604401) - ignore non-regular files in GetListOfFilesInDir (Closes: #594694) * apt-pkg/contrib/weakptr.h: - include stddefs.h to fix compile error (undefined NULL) with gcc-4.6 * methods/https.cc: - fix CURLOPT_SSL_VERIFYHOST by really passing 2 to it if enabled * deb/dpkgpm.cc: - fix popen/fclose mismatch reported by cppcheck. Thanks to Petter Reinholdtsen for report and patch! (Closes: #607803) * doc/apt.conf.5.xml: - fix multipl{y,e} spelling error reported by Jakub Wilk (Closes: #607636) * apt-inst/contrib/extracttar.cc: - let apt-utils work with encoded tar headers if uid/gid are large. Thanks to Nobuhiro Hayashi for the patch! (Closes: #330162) * apt-pkg/cacheiterator.h: - do not segfault if cache is not build (Closes: #254770) * doc/apt-get.8.xml: - remove duplicated mentioning of --install-recommends * doc/sources.list.5.xml: - remove obsolete references to non-us (Closes: #594495) * debian/rules: - use -- instead of deprecated -u for dh_gencontrol - remove shlibs.local creation and usage - show differences in the symbol files, but never fail * pre-build.sh: - remove as it is not needed for a working 'bzr bd' * debian/{apt,apt-utils}.symbols: - ship experimental unmangled c++ symbol files * methods/rred.cc: - operate optional on gzip compressed pdiffs * apt-pkg/acquire-item.cc: - don't uncompress downloaded pdiff files before feeding it to rred - try downloading clearsigned InRelease before trying Release.gpg - change the internal handling of Extensions in pkgAcqIndex - add a special uncompressed compression type to prefer those files - download and use i18n/Index to choose which Translations to download * cmdline/apt-key: - don't set trustdb-name as non-root so 'list' and 'finger' can be used without being root (Closes: #393005, #592107) * apt-pkg/deb/deblistparser.cc: - rewrite LoadReleaseInfo to cope with clearsigned Releasefiles * ftparchive/writer.cc: - add config option to search for more patterns in release command - include Index files by default in the Release file * methods/{gzip,bzip}.cc: - print a good error message if FileSize() is zero * apt-pkg/aptconfiguration.cc: - remove the inbuilt Translation files whitelist
| * * apt-inst/contrib/extracttar.cc:David Kalnischkies2011-01-131-0/+17
| |\ | | | | | | | | | - let apt-utils work with encoded tar headers if uid/gid are large. Thanks to Nobuhiro Hayashi for the patch! (Closes: #330162)
| | * Permit base256 encoded value in the numeric field of tar header.Nobuhiro Hayashi2010-12-031-0/+18
| |/
* / add support for third party changelogsMichael Vogt2010-11-161-0/+9
|/
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2010-09-281-2/+2
| | | - add a space between number and unit as required by SI (Closes: #598352)
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2010-08-161-1/+1
| | | | | | | - fix error checking for vsnprintf in its safe variant Spotted by -Wextra: contrib/strutl.cc: In function 'char* safe_snprintf(char*, char*, const char*, ...)': contrib/strutl.cc:1172:14: warning: comparison of unsigned expression < 0 is always false