Anonymous avatar Anonymous committed 397bfe7

IS-292 Fix segfaults with empty AS path on -m/-M, patch by Lorenzo Colitti <lorenzo@google.com>; (NCC#2009090973 bgpdump -M segfaults with empty AS-path, patch attached)

Bump version to 1.4.99.10

Comments (0)

Files changed (3)

 ISSUES, AS YOUR E-MAIL MAY BE LOST
 ===============================================
 
+2009-10-13 Ruben van Staveren <ruben@ripe.net>
+	* Fix segfaults with empty AS path on -m/-M 
+	  (issue IS-292)
+	  Patch contributed by Lorenzo Colitti <lorenzo@google.com> 
+
 2009-07-29 Erik Romijn <eromijn@ripe.net>
 	* Fixing incorrect as path length count in case of AS_(CONFED_)SEQUENCE
 	  (issue IS-141)
-libbgpdump-1.4.99.9
+libbgpdump-1.4.99.10
 		    inet_ntop(AF_INET6, &e->entries[i].peer->peer_ip, peer, BGPDUMP_ADDRSTRLEN);
 #endif
 		}
+
+    char *aspath_str = (e->entries[i].attr->aspath) ? e->entries[i].attr->aspath->str: "";
+
 			
 		if(e->afi == AFI_IP) {
 			inet_ntop(AF_INET, &e->prefix.v4_addr, prefix, BGPDUMP_ADDRSTRLEN);
 		   }else if(timetype==1){
 	   	   printf("TABLE_DUMP2|%u|B|%s|%s|",e->entries[i].originated_time,peer,print_asn(e->entries[i].peer->peer_as));
 		   }
-	      	   printf("%s/%d|%s|%s|",prefix,e->prefix_length,e->entries[i].attr->aspath->str,tmp1);
+	      	   printf("%s/%d|%s|%s|",prefix,e->prefix_length,aspath_str,tmp1);
 
 		    npref=e->entries[i].attr->local_pref;
 	            if( (e->entries[i].attr->flag & ATTR_FLAG_BIT(BGP_ATTR_LOCAL_PREF) ) ==0)
 		    }
 	            time2str(time,time_str);	
 	 	    printf("TABLE_DUMP_V2|%s|A|%s|%s|",time_str,peer,print_asn(e->entries[i].peer->peer_as));
-			printf("%s/%d|%s|%s\n",prefix,e->prefix_length,e->entries[i].attr->aspath->str,tmp1);
+			printf("%s/%d|%s|%s\n",prefix,e->prefix_length,aspath_str,tmp1);
 				
 		}
 	}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.