summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc
AgeCommit message (Collapse)Author
2014-02-17Translation updatesPeter Eisentraut
2014-02-17Prevent potential overruns of fixed-size buffers.Tom Lane
Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun is not really a security issue. Nonetheless it seems prudent to forestall any risk by using strlcpy() and similar functions. Fixes by Peter Eisentraut and Jozef Mlich based on Coverity reports. In addition, fix a potential null-pointer-dereference crash in contrib/chkpass. The crypt(3) function is defined to return NULL on failure, but chkpass.c didn't check for that before using the result. The main practical case in which this could be an issue is if libc is configured to refuse to execute unapproved hashing algorithms (e.g., "FIPS mode"). This ideally should've been a separate commit, but since it touches code adjacent to one of the buffer overrun changes, I included it in this commit to avoid last-minute merge issues. This issue was reported by Honza Horak. Security: CVE-2014-0065 for buffer overruns, CVE-2014-0066 for crypt()
2014-01-09Fix descriptor output in ECPG.Michael Meskes
While working on most platforms the old way sometimes created alignment problems. This should fix it. Also the regresion tests were updated to test for the reported case. Report and fix by MauMau <maumau307@gmail.com> Conflicts: src/interfaces/ecpg/preproc/type.c src/interfaces/ecpg/test/expected/sql-desc.c
2013-11-26ECPG: Make the preprocessor emit ';' if the variable type for a list ofMichael Meskes
variables is varchar. This fixes this test case: int main(void) { exec sql begin declare section; varchar a[50], b[50]; exec sql end declare section; return 0; } Since varchars are internally turned into custom structs and the type name is emitted for these variable declarations, the preprocessed code previously had: struct varchar_1 { ... } a _,_ struct varchar_2 { ... } b ; The comma in the generated C file was a syntax error. There are no regression test changes since it's not exercised. Patch by Boszormenyi Zoltan <zb@cybertec.at> Conflicts: src/interfaces/ecpg/preproc/ecpg.trailer
2013-07-06Also escape double quotes for ECPG's #line statement.Michael Meskes
2013-07-05Applied patch by MauMau <maumau307@gmail.com> to escape filenames in #line ↵Michael Meskes
statements.
2013-02-03Translation updatesPeter Eisentraut
2012-11-29When processing nested structure pointer variables ecpg always expected anMichael Meskes
array datatype which of course is wrong. Applied patch by Muhammad Usama <m.usama@gmail.com> to fix this.
2012-08-14Translation updatesPeter Eisentraut
2012-05-31Translation updatesPeter Eisentraut
2012-02-23Translation updatesPeter Eisentraut
2011-12-18In ecpg removed old leftover check for given connection name.Michael Meskes
Ever since we introduced real prepared statements this should work for different connections. The old solution just emulating prepared statements, though, wasn't able to handle this. Closes: #6309
2011-12-01Translation updatesPeter Eisentraut
2011-09-22Translation updatesPeter Eisentraut
2010-12-13Translation updates for release 8.4.6Peter Eisentraut
2010-09-30Translation updates for 8.4.5Peter Eisentraut
2010-09-22Convert cvsignore to gitignore, and add .gitignore for build targets.Magnus Hagander
2010-06-04Data returned by RETURNING clause wasn't correctly processed by ecpg. Patch ↵Michael Meskes
backported from HEAD.
2010-05-13Translation updatePeter Eisentraut
2009-11-27Remove */ characters from declare cursor statements before putting them into aMichael Meskes
comment.
2009-11-21Refactor ecpg grammar so that it uses the core grammar's unreserved_keywordTom Lane
list, minus a few specific words that have to be treated specially. This replaces a hard-wired list of keywords that would have needed manual maintenance, and was not getting it. The 8.4 coding was already missing these words, causing ecpg to incorrectly treat them as reserved words: CALLED, CATALOG, DEFINER, ENUM, FOLLOWING, INVOKER, OPTIONS, PARTITION, PRECEDING, RANGE, SECURITY, SERVER, UNBOUNDED, WRAPPER. In HEAD we were additionally missing COMMENTS, FUNCTIONS, SEQUENCES, TABLES. Per gripe from Bosco Rama.
2009-09-08Remove outside-the-scanner references to "yyleng".Tom Lane
It seems the flex developers have decided to change yyleng from int to size_t. This has already happened in the latest release of OS X, and will start happening elsewhere once the next release of flex appears. Rather than trying to divine how it's declared in any particular build, let's just remove the one existing not-very-necessary external usage. Back-patch to all supported branches; not so much because users in the field are likely to care about building old branches with cutting-edge flex, as to keep OSX-based buildfarm members from having problems with old branches.
2009-09-03Translation updatesPeter Eisentraut
2009-06-26Translation updates for 8.4 release.Peter Eisentraut
File that are translated less than 80% have been removed, as per new translation team policy.
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-06-10Arrange that the string "syntax error" generated by bison is translated.Peter Eisentraut
2009-06-03Clean up ecpg's use of mmerror(): const-ify the format argument, add anTom Lane
__attribute__() marker so that gcc can validate the format string against the actual arguments, get rid of overcomplicated and unsafe usage in base_yyerror().
2009-05-14Translation updatesAlvaro Herrera
2009-04-09Translation updates for 8.4 betaPeter Eisentraut
2009-04-06Rename the new CREATE DATABASE options to set collation and ctype intoHeikki Linnakangas
LC_COLLATE and LC_CTYPE, per discussion on pgsql-hackers.
2009-03-26Gettext plural supportPeter Eisentraut
In the backend, I changed only a handful of exemplary or important-looking instances to make use of the plural support; there is probably more work there. For the rest of the source, this should cover all relevant cases.
2009-03-08Add comments about kwlookup.c expectationsAlvaro Herrera
2009-03-07Separate the key word list that lived in keywords.c into a new header fileAlvaro Herrera
kwlist.h, to avoid having to link the backend object file into other programs like pg_dump. We can now simply symlink a single source file from the backend (kwlookup.c, containing the shared routine ScanKeywordLookup) and compile it locally, which is a lot cleaner.
2009-02-25Sort the output of --help mostly alphabetical, make it align better, makePeter Eisentraut
help of pg_dump and pg_dumpall more similar.
2009-01-30Make messages consistent with existing onesPeter Eisentraut
2009-01-30Whitespace fix in messagePeter Eisentraut
2009-01-29Message fixPeter Eisentraut
2009-01-26Message format tuningPeter Eisentraut
2009-01-23Message style reviewPeter Eisentraut
2009-01-02Split the ecpg translation support into a separate catalog for the ecpgPeter Eisentraut
preprocessor and the library. This is useful for a number of reasons: * The preprocessor and the library are in some cases installed in separate packages and used by different classes of users. * The library MO files need a different versioning scheme to account for the soname. * The makefiles are simpler, more robust, and easier to maintain this way. (NLS web site was prone to break everytime a build rule changes.) * Translators might choose to focus on the ecpglib, because that is more user-facing. * There was virtually no overlap, so nothing is lost.
2009-01-01Update copyright for 2009.Bruce Momjian
2008-12-29First rounf of whitespace changes. Everything but connect-test1 should be fine.Michael Meskes
2008-12-12Using clause has to accept signed numeric constants too.Michael Meskes
2008-12-11Append major version number and for libraries soname major version numberPeter Eisentraut
to the gettext domain name, to simplify parallel installations. Also, rename set_text_domain() to pg_bindtextdomain(), because that is what it does.
2008-11-26Removed strchrnulMichael Meskes
2008-11-26When creating a varchar struct name braces must be discarded.Michael Meskes
2008-11-26Add %expect 0 to all parser input files to prevent conflicts slipping by.Peter Eisentraut
2008-11-15Add missing dependencies to preproc.y build ruleTom Lane
2008-11-15Add missing semicolon, per grip from Alex Hunsaker.Andrew Dunstan
2008-11-14ecpg's preproc.y is now generated as needed, so remove from CVS.Tom Lane