Very odd behavior of Serial stream

you need to specify the size of the buffer, but you can certainly read something into that buff that is shorter and it will time out eventually


char s [80];

void
loop ()
{
    if (Serial.available ())  {
        memset (s, 0, sizeof(s));
        Serial.readBytesUntil (':', s, sizeof(s));

        Serial.println (s);
    }
}

void
setup ()
{
    Serial.begin (9600);
}