X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_ethernet.h;h=b141a59debd6f95f026717f297d5879ab8fbeb4a;hb=3e2eedc35f778c99cf0dd99f03dd9d78ba731041;hp=c4725a9c84181fa6b3a3aa744f70dbd44ad684eb;hpb=eb6d07ffafa4e305a4353224706b76496c3ea7a0;p=palacios.git diff --git a/palacios/include/palacios/vmm_ethernet.h b/palacios/include/palacios/vmm_ethernet.h index c4725a9..b141a59 100644 --- a/palacios/include/palacios/vmm_ethernet.h +++ b/palacios/include/palacios/vmm_ethernet.h @@ -102,9 +102,10 @@ static inline int compare_ether_hdr(const uint8_t * hdr1, const uint8_t * hdr2) /* AA:BB:CC:DD:EE:FF */ static inline int str2mac(char * macstr, uint8_t * mac){ - char hex[2], *s = macstr; + char hex[3], *s = macstr; int i = 0; + hex[2] = 0; while(s){ memcpy(hex, s, 2); mac[i++] = (char)atox(hex);