CppCon 2018: Patricia Aas “Software Vulnerabilities in C and C++”

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 15

  • @bobbymah2682
    @bobbymah2682 6 ปีที่แล้ว +9

    Fantastic job explaining the way exploits are written. Thanks!!

  • @Aporlorxl23
    @Aporlorxl23 3 ปีที่แล้ว +1

    Awesome, Thanks for video

  • @-abigail
    @-abigail 6 ปีที่แล้ว

    Excellent talk, thank you!

  • @firstnamelastname2766
    @firstnamelastname2766 6 ปีที่แล้ว +3

    Great introduction for a programmer audience.
    What I didn't get is what is meant by not allocating via new. The solution can't be make_shared, since it's also on the "not to do list", malloc is a worse idea, as, I presume, is not allocating on the heap at all. Should we put everything in pre-allocated buffers :-)? Can anybody clarify?

    • @shinu.80
      @shinu.80 3 ปีที่แล้ว

      usually if you're writing new, you're trying to manage the lifetime yourself. Which is difficult and easy to mess up. Instead stuff like unique_ptr, vector, and such are used since they are exception safe. shared_ptr makes it very ambiguous as to what owns the memory, which is why it's avoided.

  • @MrAbrazildo
    @MrAbrazildo ปีที่แล้ว

    34:45, I once generated a dragon of a bug by cleverly compress 2 lines into 1. It ended up with ?: inside ?:, I don't know how many times. I guess there were 8 cases, in which those ?: were wrong about 2 of them. Automated tests would had clean that easily.
    38:37, could you give an example? I use old style enum _a lot_ , and I don't get into trouble.

  • @alicehreli5017
    @alicehreli5017 6 ปีที่แล้ว +5

    Not something to be proud of but her claim at 30:20 is wrong: "Incorrect type conversion [...] something you can do in C and C++ that you can't do in other languages". Here is a D program that does the same:
    struct A {}
    struct B {}
    void main() {
    auto a = new A();
    auto b = cast(B*)a;
    }

    • @pati_gallardo
      @pati_gallardo 6 ปีที่แล้ว

      Ali Cehreli Thank you, I don’t know D, probably there are other languages that can do hard casts as well without runtime errors, my point was that in most languages this is not possible, but I didn’t make that clear. I did learn something about D, though, so TIL

    • @DPGrupa
      @DPGrupa 6 ปีที่แล้ว

      In natural language “can't do in other languages” can be translated to “can't do in most other widely used languages”, not necessarily “can't do in any other languages”.

    • @bitbangs
      @bitbangs 6 ปีที่แล้ว

      wouldn't call that entirely wrong. didn't say "_all_ other languages". considering professional background, i expect the word "java" is to be substituted in for "other languages" :)

    • @superscatboy
      @superscatboy 4 ปีที่แล้ว +1

      It's trivial in Pascal too (not that Pascal is really a relevant language these days).

  • @youtou252
    @youtou252 6 ปีที่แล้ว +3

    "turtle sex" on the first slide?

    • @Tinfoilpain
      @Tinfoilpain 6 ปีที่แล้ว +2

      turtle security

  • @tauicsicsics
    @tauicsicsics 6 ปีที่แล้ว +3

    Totally a waste of time, for the same subject watch Matthew Butler's talk.