+* More assertion checks and malloc()->emalloc(), courtesy of Calysto.
* [Bug 864] Place ntpd service in maintenance mode if using SMF on Solaris
* [Bug 862] includefile nesting; preserve phonelist on reconfig.
* [Bug 604] ntpd regularly dies on linux/alpha.
char *v; /* pointer to ASN1_TIME string */
struct tm tm; /* used to convert to NTP time */
+ NTP_REQUIRE(asn1time != NULL);
+ NTP_REQUIRE(asn1time->data != NULL);
+
/*
* Extract time string YYMMDDHHMMSSZ from ASN1 time structure.
* Note that the YY, MM, DD fields start with one, the HH, MM,
- * SS fiels start with zero and the Z character should be 'Z'
+ * SS fields start with zero and the Z character should be 'Z'
* for UTC. Also note that years less than 50 map to years
* greater than 100. Dontcha love ASN.1? Better than MIL-188.
*/
cnt = X509_get_ext_count(cert);
for (i = 0; i < cnt; i++) {
ext = X509_get_ext(cert, i);
+ NTP_INSIST(ext != NULL);
+ NTP_INSIST(ext->value != NULL);
method = X509V3_EXT_get(ext);
temp = OBJ_obj2nid(ext->object);
switch (temp) {
queue *create_priority_queue(int (*get_order)(void *, void *))
{
- queue *my_queue = (queue *) malloc(sizeof(queue));
+ queue *my_queue = (queue *) emalloc(sizeof(queue));
my_queue->get_order = get_order;
my_queue->front = NULL;
my_queue->no_of_elements = 0;
void *get_node(size_t size)
{
node *new_node;
- new_node = (node *) malloc(sizeof(node) + size);
+ new_node = (node *) emalloc(sizeof(node) + size);
if (new_node != NULL) {
new_node->node_next = NULL;
return new_node + 1;