Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 229157
Collapse All | Expand All

(-)core_net.c (+3 lines)
Lines 845-855 Link Here
845
            i = atoi(ptr[0]);
845
            i = atoi(ptr[0]);
846
            free(ptr[0]);
846
            free(ptr[0]);
847
847
848
	    if(i < 0 || i > sizeof(buf) - 1)
849
	        i = sizeof(buf) - 1;
848
	    if (read(session->sd, buf, i) != i) {
850
	    if (read(session->sd, buf, i) != i) {
849
                strncpy(message, "Couldn't read UBX payload",
851
                strncpy(message, "Couldn't read UBX payload",
850
                        message_len - 1);
852
                        message_len - 1);
851
                return -1;
853
                return -1;
852
            }
854
            }
855
	    buf[sizeof(buf) - 1] = 0;
853
	    // parsing PSM, by gfhuang
856
	    // parsing PSM, by gfhuang
854
	    if(0 == i) buf[0] = 0;	//important, by gfhuang, when i=0, buf is untouched!
857
	    if(0 == i) buf[0] = 0;	//important, by gfhuang, when i=0, buf is untouched!
855
858

Return to bug 229157