Skip to content

Instantly share code, notes, and snippets.

View jusabatier's full-sized avatar

Julien Sabatier jusabatier

  • Communauté d'Agglomeration du Puy-en-Velay
  • Le Puy-en-Velay
View GitHub Profile
@jusabatier
jusabatier / nginx-conf
Last active April 7, 2016 09:28
Handle Geoserver OGC service calls without params
if ( $request_uri ~ ^/geoserver/(wms|wfs|wmts)$ ) {
set $test_ogc_request "G";
}
if ( $args = '' ) {
set $test_ogc_request "${test_ogc_request}G";
}
if ( $request_method = GET ) {
set $test_ogc_request "${test_ogc_request}G";
}
if ($test_ogc_request = "GGG") {
--- Source/C/NCSUtil/malloc.c.ori 2010-02-02 00:09:24.000000000 +0100
+++ Source/C/NCSUtil/malloc.c 2010-02-02 00:17:13.000000000 +0100
@@ -390,7 +390,12 @@
#else /* SOLARIS */
#ifdef LINUX
- return(sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE));
+ long nPages = sysconf(_SC_PHYS_PAGES);
+ long nPageSize = sysconf(_SC_PAGESIZE);
+ if (nPages > INT_MAX / nPageSize)