head 1.4; access; symbols pkgsrc-2026Q1:1.4.0.96 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.4.0.94 pkgsrc-2025Q4-base:1.4 pkgsrc-2025Q3:1.4.0.92 pkgsrc-2025Q3-base:1.4 pkgsrc-2025Q2:1.4.0.90 pkgsrc-2025Q2-base:1.4 pkgsrc-2025Q1:1.4.0.88 pkgsrc-2025Q1-base:1.4 pkgsrc-2024Q4:1.4.0.86 pkgsrc-2024Q4-base:1.4 pkgsrc-2024Q3:1.4.0.84 pkgsrc-2024Q3-base:1.4 pkgsrc-2024Q2:1.4.0.82 pkgsrc-2024Q2-base:1.4 pkgsrc-2024Q1:1.4.0.80 pkgsrc-2024Q1-base:1.4 pkgsrc-2023Q4:1.4.0.78 pkgsrc-2023Q4-base:1.4 pkgsrc-2023Q3:1.4.0.76 pkgsrc-2023Q3-base:1.4 pkgsrc-2023Q2:1.4.0.74 pkgsrc-2023Q2-base:1.4 pkgsrc-2023Q1:1.4.0.72 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.4.0.70 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.68 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.66 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.64 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.4.0.62 pkgsrc-2021Q4-base:1.4 pkgsrc-2021Q3:1.4.0.60 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.58 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.4.0.56 pkgsrc-2021Q1-base:1.4 pkgsrc-2020Q4:1.4.0.54 pkgsrc-2020Q4-base:1.4 pkgsrc-2020Q3:1.4.0.52 pkgsrc-2020Q3-base:1.4 pkgsrc-2020Q2:1.4.0.48 pkgsrc-2020Q2-base:1.4 pkgsrc-2020Q1:1.4.0.28 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.50 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.46 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.44 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.42 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.40 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.38 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.36 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.34 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.32 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.30 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.26 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.24 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.22 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.20 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.18 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.16 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.14 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.12 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.10 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.8 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.6 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.4 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.2 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.3.0.40 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.38 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.36 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.34 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.3.0.32 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.3.0.30 pkgsrc-2012Q4-base:1.3 pkgsrc-2012Q3:1.3.0.28 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.3.0.26 pkgsrc-2012Q2-base:1.3 pkgsrc-2012Q1:1.3.0.24 pkgsrc-2012Q1-base:1.3 pkgsrc-2011Q4:1.3.0.22 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q3:1.3.0.20 pkgsrc-2011Q3-base:1.3 pkgsrc-2011Q2:1.3.0.18 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.16 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.14 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.12 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.10 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.8 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.6 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.4 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.2 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.2.0.40 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.38 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.36 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.34 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.32 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.30 pkgsrc-2008Q1:1.2.0.28 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.26 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.24 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.22 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.20 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.18 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.16 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.14 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.12 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.10 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.8 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.6 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.4 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.2 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.1.1.1.0.2 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.4 date 2014.04.07.15.01.44; author adam; state Exp; branches; next 1.3; commitid EASOZtjTwHL5kLvx; 1.3 date 2009.06.14.22.00.19; author joerg; state Exp; branches; next 1.2; 1.2 date 2004.09.22.08.09.56; author jlam; state Exp; branches; next 1.1; 1.1 date 2004.07.20.21.44.29; author jmmv; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2004.07.20.21.44.29; author jmmv; state Exp; branches; next ; desc @@ 1.4 log @Changes 2.06: * In main(), when parsing form input fails, the CGI script exits without producing any output whatsoever. Wouldn't it be better to actually emit an error status, instead of expecting the server to do something sane with a script that produces no output? * In mpRead(), a check is done to insure the requested length is not greater than the amount of data still available, and to adjust it if necessary. However, this check is currently done _after_ reading data from the putback buffer, in which process len is decremented by the amount of putback data read, but mpp->offset is not correspondingly incremented (this happens later). As a result, the check uses too small a value for len, and so fails to stop reading soon enough if the requested length is greater than what is available _and_ there was any data in the putback buffer. The fix is to move the check to the beginning of mpRead() * Further, if a read request is satisfied _entirely_ from the putback buffer, mpp->offset is not updated at all, resulting in a similar problem. The solution is to update mpp->offset in the "else if (got)" case. * In cgiParsePostMultipartInput(), if the Content-Disposition of a part is not "form-data", afterNextBoundary() is not called before beginning to process the next part. As a result, parsing of the next part headers begins with the body of the unwanted part. It is necessary in this case to call afterNextBoundary() before continuing with the next cycle. * In handling out-of-memory conditions in afterNextBoundary(), *outP is set to '\0'. While this is technically legal ('\0' is "an integral constant expression with the value 0"), it looks funny. * In cgiCookieString(), a change was introduced in v2.02 which purports to prevent an overrun in cases where cgiCookie is exactly equal to the requested cookie name. In fact, the problem can also occur if the requested name occurs with no values at the end of cgiCookie. Further, the change from v2.02 does not fix the problem, because it compares the _pointers_ p and n to NULL, which they will never equal, rather than comparing the pointers they point at to NUL. * Also in cgiCookieString(), there is a comment suggesting that the main loop never terminates except with a return. This is not the case. For example, it will terminate if the requested cookie is not found and the cgiCookie string ends in a semicolon. * Why did days[] (formerly daysOfWeek[]) and months[] become non-static? This pollutes the namespace of programs using CGIC. * In cgiReadEnvironment(), when reading in the contents of an uploaded file, it is possible that a temporary file is successfully created but then cannot be opened. In this case, no attempt is made to remove the tempoary file. * Further, when a form entry does _not_ include an uploaded file, e->tfileName is set to malloc'd but uninitialized memory. It should be set to an empty string, by setting e->tfileName[0] to zero after the 1-byte buffer is allocated. @ text @@@comment $NetBSD: PLIST,v 1.3 2009/06/14 22:00:19 joerg Exp $ include/cgic.h lib/libcgic.la libexec/cgi-bin/capture libexec/cgi-bin/cgictest share/doc/cgiclib/cgic.html share/examples/cgiclib/capture.c share/examples/cgiclib/cgictest.c @ 1.3 log @Convert @@exec/@@unexec to @@pkgdir or drop it. @ text @d1 1 a1 1 @@comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:56 jlam Exp $ d6 1 a6 1 share/doc/html/cgiclib/cgic.html @ 1.2 log @Mechanical changes to package PLISTs to make use of LIBTOOLIZE_PLIST. All library names listed by *.la files no longer need to be listed in the PLIST, e.g., instead of: lib/libfoo.a lib/libfoo.la lib/libfoo.so lib/libfoo.so.0 lib/libfoo.so.0.1 one simply needs: lib/libfoo.la and bsd.pkg.mk will automatically ensure that the additional library names are listed in the installed package +CONTENTS file. Also make LIBTOOLIZE_PLIST default to "yes". @ text @d1 1 a1 1 @@comment $NetBSD: PLIST,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ a8 2 @@dirrm share/examples/cgiclib @@dirrm share/doc/html/cgiclib @ 1.1 log @Initial revision @ text @d1 1 a1 1 @@comment $NetBSD$ a2 1 lib/libcgic.a a3 3 lib/libcgic.so lib/libcgic.so.0 lib/libcgic.so.0.0 @ 1.1.1.1 log @Initial import of cgic, version 2.02, provided by cinnion at ka8zrt.com: This is the code written to accompany Thomas Boutell's book "CGI Programming in C & Perl". It provides a library of routines for use in CGI programming, and unlike cgilib-0.5, this library handles the "multipart/form-data" encoding required to use the FILE input control type as defined in the HTML specification. NOTE: It should be aware that there were a few developer visible changes made from Thomas Boutell's original distribution when integrating it with the NetBSD packages environment. They are: 1) Instead of being yet another source file which is used in building the application, the package have been converted totally into a library format. This library is linked using "-lcgic". 2) As a result of the first item, the developer no longer writes their entry point under the function name of cgiMain(). Instead, the user will provide their own main(), and will need to call cgiInit() before any other cgic function is called. @ text @@