Strange reset when reading strings from PROGMEM

gvi70000:
i have the following code
.....................
the arduino uno resets each time i run this code

What i did wrong in the loop?
Thanks

Here's how I would do it:

void setup()
{
        char *buffer;

        const char *stars[50] = {
                PSTR("Sirius"),
                PSTR("Canopus"),
                PSTR("Arcturus"),
                PSTR("RigilKentaurus"),
                PSTR("Vega"),
                PSTR("Capella"),
                PSTR("Rigel"),
                PSTR("Procyon"),
                PSTR("Achernar"),
                PSTR("Betelgeuse"),
                PSTR("Hadar"),
                PSTR("Altair"),
                PSTR("Aldebaran"),
                PSTR("Antares"),
                PSTR("Spica"),
                PSTR("Pollux"),
                PSTR("Fomalhaut"),
                PSTR("Mimosa"),
                PSTR("Deneb"),
                PSTR("Acrux"),
                PSTR("Regulus"),
                PSTR("Adhara"),
                PSTR("Gacrux"),
                PSTR("Shaula"),
                PSTR("Bellatrix"),
                PSTR("ElNath"),
                PSTR("Miaplacidus"),
                PSTR("Alnilan"),
                PSTR("AlNa'ir"),
                PSTR("Alioth"),
                PSTR("Gama2"),
                PSTR("Mirfak"),
                PSTR("Dubhe"),
                PSTR("Wezen"),
                PSTR("KausAustralis"),
                PSTR("Avior"),
                PSTR("Alkaid"),
                PSTR("Sargas"),
                PSTR("Menkaliman"),
                PSTR("Atria"),
                PSTR("Alhena"),
                PSTR("Peacock"),
                PSTR("Delta"),
                PSTR("Mirzam"),
                PSTR("Castor"),
                PSTR("Alphard"),
                PSTR("Hamal"),
                PSTR("Polaris"),
                PSTR("Nunki"),
                PSTR("DenebKaitos")
        };

        Serial.begin(9600);

        buffer = (char *) malloc((64) * sizeof(char)); // 64 bytes should be enough

        if(!buffer) {
                Serial.print("Allocate buffer failed\r\n");
                return;
        }

        for(byte j = 0; j<50; j++) {
                sprintf_P(buffer, stars[j]);
                Serial.println(buffer);
        }

        free(buffer);
}

void loop()
{
}