73 karma · joined Aug 2, 2015 (11y ago) · 47 submissions
comment 11y ago · link · parent
Don't put words in my mouth please.
I reject the thesis that trust is binary. Were I to accept it, I trust nobody - everyone is vulnerable to being subverted by blackmail, intimidation, making mistakes, etc.
You seem to be using a different definition of the word trust than I did. Everyone is vulnerable, does that mean you cannot trust anyone? No, you certainly can, that is the whole point of trust.
comment 11y ago · link · parent
comment 11y ago · link · parent
Apparently new is a "special" operator, or there is a bug in the compiler. I also can't get a warning with g++.
The problem seems to be that, as I said, [] takes any integer expression, it is there where the value gets truncated when operator sizeof or new is applied on it since they either return or take a size_t value.
comment 11y ago · link · parent
comment 11y ago · link · parent
I think this problem in C would be solved with a single flag: -Wwarn-if-using-integers-of-different-types-in-an-operation , forcing you to cast the integer if the types don't match in a arithmetic operation, or an assignment.
comment 11y ago · link · parent
This is defined and perfectly normal.
However signed integers will cause undefined behavior on overflow and there is a common flag in most compilers to trap on overflow.
14.
Another Salvo in the Second Crypto War (of Words)(schneier.com ↗)
1 points · by cautious_int · 11y ago · discuss
comment 11y ago · link · parent
In other words, C allows that UINT_MAX == INT_MAX, in which case you will overflow.
If they made that assumption, they should explicitly mention it, but they didn't.
> Update 17 Feb 2008:... ...Now that we've made this change, we know that the program is correct;)
It seems the article is aware of the irony. Another update would be in order.
comment 11y ago · link · parent
They are way better than any soft drink. Even if you pick the fruit with the most fructose/glucose percentage you still get the benefit of slower digestion due to fibers which slow digestion. Slight exaggeration, but in comparison, drinks are almost an injection of sugar into the blood-stream.
I would consider them healthy if they are ingested in appropriate quantities, without any added sugars, and along with some additional food that is rich with protein and fibers, like wheat and grains.
comment 11y ago · link · parent
https://bitbucket.org/knight666/utf8rewind/src/c22e458912952...
https://bitbucket.org/knight666/utf8rewind/src/c22e458912952...
https://bitbucket.org/knight666/utf8rewind/src/c22e458912952...
The prior while statement makes sure the second parameter src_size is never 0, but the pointer src might be.
Undefined behavior can be caused by passing a NULL pointer as the first parameter and a non-negative second parameter to utf8toutf16().