leodeid | 7 years ago | on: Massacring C Pointers
leodeid's comments
leodeid | 7 years ago | on: Massacring C Pointers
1. Returns pointer to stack-allocated data, which immediately becomes invalid. Instead, it should be using some sort of allocation (e.g. 'malloc'), or taking in a destination pointer.
2. 'r' is arbitrarily set with length 100. Smaller strings don't need all that space, and larger strings definitely will overrun.
3. The function signature is really awkward. Without any of the surrounding textbook content, I'm not sure what behavior is supposed to happen. At first, I expected something like 'strcat', which takes two char* and appends the second one to the first one. But that isn't happening here and instead it seems to require dynamic allocation. (Hiding allocations inside a function is generally kind of weird. Usually the caller should be responsible for passing in a handle to the destination.)
4. There's no sensical limit on the loop iteration. If the input 't' doesn't have a null terminator, this is going to throw a ton of garbage into the stack space (because 'r' is stack-allocated to a fixed size). And also maybe run for a really long time.
5. 'strcpy' should usually be replaced by 'strncpy', which performs the same function but also requires you to provide a limit ("copy this string, but at most 'n' bytes"). That prevents a class of exploitable errors known as "buffer overruns". I don't know when the 'n' string functions were added to C or became popular, though.
This is a teaching exercise, so the fact that this is implemented as a separate function instead of calling 'strcat' from <string.h> doesn't seem like a big problem.
leodeid | 8 years ago | on: Lung Cancer Patients Live Longer with Immune Therapy
[1] https://clinicaltrials.gov/ct2/show/NCT02998983
[2] https://clinicaltrials.gov/ct2/show/NCT01460472
[3] https://clinicaltrials.gov/ct2/show/NCT01598454
[4] https://clinicaltrials.gov/ct2/show/NCT01240447
[6] https://en.wikipedia.org/wiki/Racotumomab#Clinical_trials
leodeid | 8 years ago | on: Lung Cancer Patients Live Longer with Immune Therapy
[1] https://www.cancer.org/treatment/treatments-and-side-effects...
[2] https://www.cancer.org/treatment/treatments-and-side-effects...
leodeid | 8 years ago | on: Palantir worked with Cambridge Analytica on the Facebook data it acquired
Palantir.com doesn't seem to have anything referencing the source of the name.
leodeid | 8 years ago | on: Scientists Discover Particle Formed by Three Photons
leodeid | 8 years ago | on: JVM Anatomy Park
leodeid | 9 years ago | on: Why Many Cities Have No Money
leodeid | 9 years ago | on: To Slow Global Warming, We Need Nuclear Power (Op-Ed)
leodeid | 9 years ago | on: To Slow Global Warming, We Need Nuclear Power (Op-Ed)
leodeid | 9 years ago | on: How to not fuck up your manufacturing startup
leodeid | 9 years ago | on: How to not fuck up your manufacturing startup
Do you have experience with TRIZ? What "is it" to you?
leodeid | 9 years ago | on: My Favorite Books of 2016
I don't know how the Gates Foundation functions, so the level of which Bill should be implicated in the failings of this study are unclear to me. It sounds like the study would have been fairly inexpensive, and thus relegated to maybe just a footnote on one afternoon for Bill.
The eugenics-style arguments seen up in the parent comment seem to be a result of over-extrapolation of his "Innovating to zero" TED talk[1]. He alludes to, but does not cite, statistics correlating quality of life, health, and number of children. I also cannot find a concrete source, but playing around with wolfram alpha, it seems like there is at least a correlation according to their datasets[2].
[1] https://www.ted.com/talks/bill_gates/transcript?language=en#... [2] https://www.wolframalpha.com/input/?i=life+expectancy+%7C+ch...
leodeid | 9 years ago | on: The Last Diplomat
I'm sure the NSA is (at this point) aware of this problem, and trying to make the collected data more context-aware. I wonder to what extent the content of just phone calls, texts, emails, and facebook posts can be used to learn small-group dynamics. (Like the fact that the people of E-7 in the story consider talks of a Pakistani coup to be normal idle dinner talk.)
leodeid | 9 years ago | on: A kidney donor at 18 now regrets it
What are some of the things that you find yourself needing to advocate for yourself about? Isn't long term care just annual creatinine level tests (which looks like a simple blood draw)?
leodeid | 9 years ago | on: Costa Rica has gone 76 days using 100% renewable electricity
[1] https://www.law.cornell.edu/supct/html/99-138.ZD1.html [2] http://www.nationalreview.com/bench-memos/373697/clarence-th... - I wasn't able to find a clear opinion from Thomas citing the DoI, but I am not good at searching through opinions.
leodeid | 9 years ago | on: Born to Rest
leodeid | 9 years ago | on: Priorities in security
If that is the point, it seems to humanize the problem space in a different sort of way. Security researchers are people, too. Some are "good", some are "bad", but most people are in between. But instead of framing your work on targeted individual attacks as a journalist being targeted by a state-level actor, realize that there are other researchers out there with your same very specific set of skills which would allow him/her to target someone of their own choosing. In this example, perhaps the researcher is vindictively stalking an ex.
Outside of that, though, I can't help but think that there is a much more interesting and broader point about the humanity that is affected by the work you do in both security and privacy. If you consider people who are not as skilled, but still as vindictive, malicious tweets from fake accounts multiple times per day is pretty bad. Couples that share passwords can end up really enabling this vindictive behavior. (gasp who would ever share passwords to something private like that? Perhaps an abusive partner demands access to email and hangs onto a recovery key.)