home.social

#overflow — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #overflow, aggregated by home.social.

  1. THANK YOU ALL!!! - what errors should I check for and handle?

    Thank you all for your kind, patient and educative responses when I obnoxiously post amateur questions! 💙 While I cannot make any promises because of how my brain works, I am almost ready to continue reading *The C Programming Language, 2nd Edition”. I just want to experiment a little bit with error handling, specifially how to handle wrong input (char VS. int, etc.) and also to learn to indentify code that runs the risk of overflow/underflow.

    Question: what errors do you recommend checking for and handling?

    Meanwhile, thank you all! 🥰

    #include <stdio.h>  
    
    //Function declarations  
    int newPin();  
    int checkPin(int i);  
    
    //Program that prompts for, verifies and saves pins temporarily into an array  
    int main() {  
    
        //New pin  
        int pin = 0;  
    
        //History  
        int history[10] = {0,0,0,0,0,0,0,0,0,0};  
        int history_limit = 10;  
        int history_index = 0;  
    
        printf("Hello there! What would you like to do? (V)iew your saved pins, (S)ave a new pin or (E)xit: ");  
        int choice = 0;  
        while ((choice = getchar()) != EOF) {  
            switch (choice) {  
                case ('V'): { //Display saved pins  
                    printf("\nYour saved pins are:\n\n");  
                    for (int i = 0; i < history_limit; i++) printf("%d\n", history[i]);  
                    printf("\nWhat would you like to do next? (V)iew your saved pins, (S)ave a new pin or (E)xit: ");  
                    break;  
                }  
                case('S'): { //Prompt for and verify newly entered pin  
                    pin = newPin();  
                    if (checkPin(pin) == pin) {  
                        history[history_index] = pin;  
                        history_index++;  
                        if (history_index >= history_limit) history_index = 0;  
                    }  
                    break;  
                }  
                case ('E'): goto EXIT; //Terminate program  
            }  
        }  
    EXIT:   printf("\nGoodbye!\n");  
        return 0;  
    }  
    
    //Function definitions  
    //Prompt user to enter a new pin  
    int newPin() {  
    
        int pin = 0;  
    
        printf("This enter your pin: ");  
        scanf("%d", &pin);  
        getchar();  
    
        return pin;  
    }  
    
    //Verify newly entered pin  
    int checkPin (int i) {  
    
        int check = 0;  
    
        printf("Confirm your new pin: ");  
        while((scanf("%d", &check)) != EOF) {  
            if (check != i) printf("Mismatch! Confirm your new pin: ");  
            else if (check == i) { 
                printf("Success! Your new pin is %d. What would you like to do next? (V)iew your saved pins, (S)ave a new pin or (E)xit: ", i);  
                goto EXIT;  
            }  
        }  
    EXIT:   return i;  
    }  
    
    //TODO  
    //Error handling (overflow, input data type, other?)  
    
  2. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  3. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  4. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  5. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  6. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  7. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  8. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  9. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  10. In Java unterscheidest du grob zwischen primitiven Datentypen und Referenztypen. Primitive Typen sind die Basis: Sie speichern den Wert direkt, ohne Objekt-Hülle. Das macht sie schnell, vorhersehbar und speichereffizient. Wichtig ist dabei: Die Größe der primitiven Typen ist in Java fest definier

    magicmarcy.de/datentypen-in-ja

    #DAtentypen #Java #Stolperfallen #2038 #Overflow #int #Integer #String #float #double #BigDecimal #Wertebereiche #Programming

  11. Security Patches

    InfoSec

    Regardless of which Operating System you run, it is important to keep up with the critical updates to keep your machines as safe as possible

    • Realize that by the time a critical bug has been reported, verified, patched and delivered to your distribution of choice, a significant amount of time has passed...
    • From the first day the bug has been discovered [zero day] to the day you patch your computing machine, you've had a vunurable open machine in that one respect.
    • Keep the amount of time between the availability, of patches & the update of your machines, especially your VMs (Qemu et al) & physical servers as short as possible
    • Make sure to always use manual updates on your server VM's!
    • I shall not explain why, start reading on Wikipedia and furthe, the explanation is too long for this short post

    Notes:

    • every OS can have vunurabilities
    • Security in obscurity does not work!
    • you are not secure because you run obsolete AmigaOS QNX or cool and niche *BSD as an OS
    • buffer overflows hide everywhere
    • I reguraly find them!

    #Security #patches #programming #InfoSec #AmigaOS #Amiga #QNX #Linux #feeBSD #netBSD #openBSD #technology #software #buffer #overflow #mathematics

  12. Security Patches

    InfoSec

    Regardless of which Operating System you run, it is important to keep up with the critical updates to keep your machines as safe as possible

    • Realize that by the time a critical bug has been reported, verified, patched and delivered to your distribution of choice, a significant amount of time has passed...
    • From the first day the bug has been discovered [zero day] to the day you patch your computing machine, you've had a vunurable open machine in that one respect.
    • Keep the amount of time between the availability, of patches & the update of your machines, especially your VMs (Qemu et al) & physical servers as short as possible
    • Make sure to always use manual updates on your server VM's!
    • I shall not explain why, start reading on Wikipedia and furthe, the explanation is too long for this short post

    Notes:

    • every OS can have vunurabilities
    • Security in obscurity does not work!
    • you are not secure because you run obsolete AmigaOS QNX or cool and niche *BSD as an OS
    • buffer overflows hide everywhere
    • I reguraly find them!

    #Security #patches #programming #InfoSec #AmigaOS #Amiga #QNX #Linux #feeBSD #netBSD #openBSD #technology #software #buffer #overflow #mathematics

  13. Security Patches

    InfoSec

    Regardless of which Operating System you run, it is important to keep up with the critical updates to keep your machines as safe as possible

    • Realize that by the time a critical bug has been reported, verified, patched and delivered to your distribution of choice, a significant amount of time has passed...
    • From the first day the bug has been discovered [zero day] to the day you patch your computing machine, you've had a vunurable open machine in that one respect.
    • Keep the amount of time between the availability, of patches & the update of your machines, especially your VMs (Qemu et al) & physical servers as short as possible
    • Make sure to always use manual updates on your server VM's!
    • I shall not explain why, start reading on Wikipedia and furthe, the explanation is too long for this short post

    Notes:

    • every OS can have vunurabilities
    • Security in obscurity does not work!
    • you are not secure because you run obsolete AmigaOS QNX or cool and niche *BSD as an OS
    • buffer overflows hide everywhere
    • I reguraly find them!

    #Security #patches #programming #InfoSec #AmigaOS #Amiga #QNX #Linux #feeBSD #netBSD #openBSD #technology #software #buffer #overflow #mathematics

  14. Security Patches

    InfoSec

    Regardless of which Operating System you run, it is important to keep up with the critical updates to keep your machines as safe as possible

    • Realize that by the time a critical bug has been reported, verified, patched and delivered to your distribution of choice, a significant amount of time has passed...
    • From the first day the bug has been discovered [zero day] to the day you patch your computing machine, you've had a vunurable open machine in that one respect.
    • Keep the amount of time between the availability, of patches & the update of your machines, especially your VMs (Qemu et al) & physical servers as short as possible
    • Make sure to always use manual updates on your server VM's!
    • I shall not explain why, start reading on Wikipedia and furthe, the explanation is too long for this short post

    Notes:

    • every OS can have vunurabilities
    • Security in obscurity does not work!
    • you are not secure because you run obsolete AmigaOS QNX or cool and niche *BSD as an OS
    • buffer overflows hide everywhere
    • I reguraly find them!

    #Security #patches #programming #InfoSec #AmigaOS #Amiga #QNX #Linux #feeBSD #netBSD #openBSD #technology #software #buffer #overflow #mathematics

  15. Security Patches

    InfoSec

    Regardless of which Operating System you run, it is important to keep up with the critical updates to keep your machines as safe as possible

    • Realize that by the time a critical bug has been reported, verified, patched and delivered to your distribution of choice, a significant amount of time has passed...
    • From the first day the bug has been discovered [zero day] to the day you patch your computing machine, you've had a vunurable open machine in that one respect.
    • Keep the amount of time between the availability, of patches & the update of your machines, especially your VMs (Qemu et al) & physical servers as short as possible
    • Make sure to always use manual updates on your server VM's!
    • I shall not explain why, start reading on Wikipedia and furthe, the explanation is too long for this short post

    Notes:

    • every OS can have vunurabilities
    • Security in obscurity does not work!
    • you are not secure because you run obsolete AmigaOS QNX or cool and niche *BSD as an OS
    • buffer overflows hide everywhere
    • I reguraly find them!

    #Security #patches #programming #InfoSec #AmigaOS #Amiga #QNX #Linux #feeBSD #netBSD #openBSD #technology #software #buffer #overflow #mathematics

  16. Oh, joy! Another riveting tale of a #four-byte #heap #overflow in FFmpeg's #EXIF writer. 🤦‍♂️ Because who doesn't love diving into the scintillating world of internal workings for a #bug that lived for three whole days? 🙄 Let's all trust #FFmpeg, until it self-destructs again. 🚀
    bugs.pwno.io/0014 #overflow #tech #news #security #vulnerability #HackerNews #ngated

  17. 🎨 Oh wow, another #techie #bible on how to make your #laptop sweat by #rendering #mesh #gradients with #RBF #interpolation. 🤓 Because everyone knows, nothing says "cutting-edge" like having 17 tabs of #Stack #Overflow open while praying to the gods of Notion that your code doesn't crash your computer. 🚀
    notion.so/Smooth-Mesh-Gradient #HackerNews #ngated

  18. @jerry 's recent #kitchen #sink #project reminded me of something I've long wondered about.

    #Bathtubs have #overflow #drains.

    #Bathroom #sinks mostly seem to have overflow drains.

    I don't think I've ever seen a kitchen sink with an overflow drain, and I've overflowed a couple in my life as a result.

    Anyone #know if there's a practical #reason kitchen sinks don't have 'em? Or is it just "always been done that way"?

    #ModernMystery #why

  19. Good to see #thameswater sharing #data for near real-time information about #storm #overflow activity.

    It shows #discharges into #watercourses

    Data questions I have - Is there access to the underlying data? What is the #licensing? Is this #opendata

    thameswater.co.uk/edm-map