ALT Linux Bugzilla
– Attachment 2045 Details for
Bug 12135
Падает scrollkeeper-update при неправильном состоянии каталогов
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Более развёрнутый патч
scrollkeeper.patch (text/plain), 1.03 KB, created by
serpiph
on 2007-06-25 16:44:22 MSD
(
hide
)
Description:
Более развёрнутый патч
Filename:
MIME Type:
Creator:
serpiph
Created:
2007-06-25 16:44:22 MSD
Size:
1.03 KB
patch
obsolete
>diff -Naur scrollkeeper-0.3.14.orig/libs/database.c scrollkeeper-0.3.14/libs/database.c >--- scrollkeeper-0.3.14.orig/libs/database.c 2002-06-02 10:03:10 +0400 >+++ scrollkeeper-0.3.14/libs/database.c 2007-06-25 16:38:14 +0400 >@@ -17,6 +17,7 @@ > */ > > #include <config.h> >+#include <limits.h> > #include <stdlib.h> > #include <string.h> > #include <stddef.h> >@@ -160,7 +161,20 @@ > else /* link the directory */ > { > char *target_locale; >- char aux_path[PATHLEN]; >+ int path_max = 4096; >+ char *aux_path; >+#ifdef PATH_MAX >+ path_max = PATH_MAX; >+#else >+ path_max = pathconf (source_path, _PC_PATH_MAX); >+ if (path_max <= 0) path_max = 4096; >+#endif >+ >+ aux_path = (char *)malloc(path_max); >+ if (!aux_path) { >+ printf ("No enough memory!\n"); >+ return 2; >+ } > > realpath(source_path, aux_path); > target_locale = strrchr(aux_path, '/'); >@@ -170,6 +184,7 @@ > snprintf(target_path, PATHLEN, "%s", target_locale); > > symlink(target_path, source_path); >+ free (aux_path); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12135
:
2040
|
2041
|
2042
|
2044
|
2045
|
2047
|
2052
|
2062
|
2063
|
2065
|
2070