←back to thread

387 points pedro84 | 2 comments | | HN request time: 0.456s | source
Show context
Animats ◴[] No.14860964[source]
C's lack of array size info strikes again:

    memcpy(current_wmm_ie, ie->data, ie->len);
where "ie" points to data obtained from the net.
replies(2): >>14861129 #>>14861284 #
corndoge ◴[] No.14861284[source]
Programmer's mistake for not validating data, not the fault of C language mechanics. Yes it would be easier if <hll features>, still gotta be careful. I've made plenty of these mistakes but never blamed the language.
replies(5): >>14861427 #>>14861944 #>>14861961 #>>14866096 #>>14871609 #
justinjlynn ◴[] No.14861961[source]
There's a reason "THIS SIDE TOWARDS ENEMY" is a thing.
replies(1): >>14868615 #
1. Animats ◴[] No.14868615[source]
It's actually

       FRONT

    TOWARD ENEMY
[1] https://en.wikipedia.org/wiki/M18_Claymore_mine
replies(1): >>14879304 #
2. justinjlynn ◴[] No.14879304[source]
Fair enough. Thanks for the correction and additional information.