library/src/exploitation/WebExploitation/SQLErrCodes/BP-WebExploitPostgresErrCodes.cc
// Generates a newly allocated error code array
Generates a newly allocated error code array
Generates a newly allocated error code array
P_BP_POSTGRES_ERR_CODES BP_PostgresGenErrCodeArray(){
	P_BP_POSTGRES_ERR_CODES retTable = (P_BP_POSTGRES_ERR_CODES) bpcalloc(sizeof(postgresErrCodes), 1);
	if(!retTable)
		return NULL;
	BP_POSTGRES_ERR_CODES nullCmp;
	memset(&nullCmp, 0x00, sizeof(nullCmp));
	size_t x = 0;
	for(x = 0; ( sizeof(BP_POSTGRES_ERR_CODES) * x ) < sizeof(postgresErrCodes); x++){
		retTable[x].postgresErrCode = bpstrdup(postgresErrCodes[x].postgresErrCode);
		retTable[x].postgresErrStr = bpstrdup(postgresErrCodes[x].postgresErrStr);
	}
	return retTable;
}
P_BP_POSTGRES_ERR_CODES BP_PostgresGenErrCodeArray ( ) { P_BP_POSTGRES_ERR_CODES retTable = ( P_BP_POSTGRES_ERR_CODES ) bpcalloc ( sizeof ( postgresErrCodes ) , 1 ) ; if ( ! retTable ) return NULL ; BP_POSTGRES_ERR_CODES nullCmp ; memset ( & nullCmp , 0x00 , sizeof ( nullCmp ) ) ; size_t x = 0 ; for ( x = 0 ; ( sizeof ( BP_POSTGRES_ERR_CODES ) * x ) < sizeof ( postgresErrCodes ) ; x ++ ) { retTable [ x ] . postgresErrCode = bpstrdup ( postgresErrCodes [ x ] . postgresErrCode ) ; retTable [ x ] . postgresErrStr = bpstrdup ( postgresErrCodes [ x ] . postgresErrStr ) ; } return retTable ; }
Generates a newly allocated error code array
Generates a newly allocated error code array
// duplicate the array // duplicate string in table