pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Disallow null category in crosstab_hash 7+ messages / 1 participants [nested] [flat]
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/d5b9c2baff662aac22cd2a497d5bcd3b5a916fd0 Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b5e7569dddd2ef8b3d84b528be916647e7465c12 Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f49e5efbc29af0d7d58a9bdffbd314b85a1cf6af Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/81be0c57e2908667acbf7595744d045a4bec1df7 Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3757c164008c2659ff5b28ab97854c3f5d919de4 Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/70fc6c4ef3c3790284796db3935d6f2d040b60bd Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow null category in crosstab_hash @ 2019-12-23 18:36 Joe Conway <mail@joeconway.com> 0 siblings, 0 replies; 7+ messages in thread From: Joe Conway @ 2019-12-23 18:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow null category in crosstab_hash While building a hash map of categories in load_categories_hash, resulting category names have not thus far been checked to ensure they are not null. Prior to pg12 null category names worked to the extent that they did not crash on some platforms. This is because those system libraries have an snprintf which can deal with being passed a null pointer argument for a string. But even in those cases null categories did nothing useful. And on some platforms it crashed. As of pg12, our own version of snprintf gets called, and it does not deal with null pointer arguments at all, and crashes consistently. Fix that by disallowing null categories. They never worked usefully, and no one has ever asked for them to work previously. Back-patch to all supported branches. Reported-By: Ireneusz Pluta Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4a3cdb531be57bf96acd211e9c058b1b72a6fb39 Modified Files -------------- contrib/tablefunc/tablefunc.c | 5 +++++ 1 file changed, 5 insertions(+) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2019-12-23 18:36 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com> 2019-12-23 18:36 pgsql: Disallow null category in crosstab_hash Joe Conway <mail@joeconway.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox