Changeset 17716


Ignore:
Timestamp:
10/05/11 15:10:50 (21 months ago)
Author:
BrainSlayer
Message:

fix pointer dereference

Location:
src/router/httpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/httpd.h

    r17706 r17716  
    8282 
    8383typedef struct { 
    84         char *path;             /* Web page URL path */ 
     84        const char *path;               /* Web page URL path */ 
    8585        unsigned int size;      /* Size of web page in bytes */ 
    8686} websRomPageIndexType; 
  • src/router/httpd/visuals/ejs.c

    r17713 r17716  
    4646int (*wfputs) (char *buf, webs_t fp) = NULL; 
    4747char *(*live_translate) (char *tran) = NULL; 
    48 websRomPageIndexType *websRomPageIndex = NULL; 
     48websRomPageIndexType *PwebsRomPageIndex = NULL; 
    4949char *(*GOZILA_GET) (webs_t wp, char *name) = NULL; 
    5050void (*validate_cgi) (webs_t fp) = NULL; 
     
    7171        wfputc = env->Pwfputc; 
    7272        wfputs = env->Pwfputs; 
    73         websRomPageIndex = env->PwebsRomPageIndex; 
     73        PwebsRomPageIndex = env->PwebsRomPageIndex; 
    7474        live_translate = env->Plive_translate; 
    7575        GOZILA_GET = env->PGOZILA_GET; 
     
    11851185        int i = 0; 
    11861186 
    1187         while (websRomPageIndex[i].path != NULL) { 
    1188                 cprintf("checking %s\n", websRomPageIndex[i].path); 
     1187        while (PwebsRomPageIndex[i].path != NULL) { 
     1188                cprintf("checking %s\n", PwebsRomPageIndex[i].path); 
    11891189                if (!strncmp 
    1190                     (websRomPageIndex[i].path, "lang_pack/", 
     1190                    (PwebsRomPageIndex[i].path, "lang_pack/", 
    11911191                     strlen("lang_pack/"))) { 
    11921192                        cprintf("found language\n"); 
    1193                         if (strlen(websRomPageIndex[i].path) < 14) 
     1193                        if (strlen(PwebsRomPageIndex[i].path) < 14) 
    11941194                                continue; 
    1195                         strcpy(buf, websRomPageIndex[i].path); 
     1195                        strcpy(buf, PwebsRomPageIndex[i].path); 
    11961196                        char *mybuf = &buf[strlen("lang_pack/")]; 
    11971197 
Note: See TracChangeset for help on using the changeset viewer.