library/src/exploitation/WebExploitation/SQLErrCodes/BP-WebExploitMysqlErrCodes.cc
// Generates a newly allocated error code array
Generates a newly allocated error code array
Generates a newly allocated error code array
P_BP_MYSQL_ERR_CODES BP_MysqlGenErrCodeArray(){
	P_BP_MYSQL_ERR_CODES retTable = (P_BP_MYSQL_ERR_CODES) bpcalloc(sizeof(mysqlErrCodes), 1);
	if(!retTable)
		return NULL;
	BP_MYSQL_ERR_CODES nullCmp;
	memset(&nullCmp, 0x00, sizeof(nullCmp));
	size_t x = 0;
	for(x = 0; ( sizeof(BP_MYSQL_ERR_CODES) * x ) < sizeof(mysqlErrCodes); x++){
		retTable[x].myqlErrCode = bpstrdup(mysqlErrCodes[x].myqlErrCode);
		retTable[x].mysqlErrStr = bpstrdup(mysqlErrCodes[x].mysqlErrStr);
	}
	return retTable;
}
P_BP_MYSQL_ERR_CODES BP_MysqlGenErrCodeArray ( ) { P_BP_MYSQL_ERR_CODES retTable = ( P_BP_MYSQL_ERR_CODES ) bpcalloc ( sizeof ( mysqlErrCodes ) , 1 ) ; if ( ! retTable ) return NULL ; BP_MYSQL_ERR_CODES nullCmp ; memset ( & nullCmp , 0x00 , sizeof ( nullCmp ) ) ; size_t x = 0 ; for ( x = 0 ; ( sizeof ( BP_MYSQL_ERR_CODES ) * x ) < sizeof ( mysqlErrCodes ) ; x ++ ) { retTable [ x ] . myqlErrCode = bpstrdup ( mysqlErrCodes [ x ] . myqlErrCode ) ; retTable [ x ] . mysqlErrStr = bpstrdup ( mysqlErrCodes [ x ] . mysqlErrStr ) ; } return retTable ; }
Generates a newly allocated error code array
Generates a newly allocated error code array
// duplicate the array